Skip to content

Commit 41ff81f

Browse files
committed
export expando with utils + include src with npm package
1 parent 07708fa commit 41ff81f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,9 @@ Mounts a plugin to Sortable.
739739
* clone(el`:HTMLElement`)`:HTMLElement` — create a deep copy of the set of matched elements
740740
* toggleClass(el`:HTMLElement`, name`:String`, state`:Boolean`) — add or remove one classes from each element
741741
* detectDirection(el`:HTMLElement`)`:String` — automatically detect the [direction](https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#direction) of the element as either `'vertical'` or `'horizontal'`
742-
743-
742+
* index(el`:HTMLElement`, selector`:String`)`:Number` — index of the element within its parent for a selected set of elements
743+
* getChild(el`:HTMLElement`, childNum`:Number`, options`:Object`, includeDragEl`:Boolean`):`HTMLElement` — get the draggable element at a given index of draggable elements within a Sortable instance
744+
* expando`:String` — expando property name for internal use, sortableListElement[expando] returns the Sortable instance of that elemenet
744745
---
745746

746747

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"files": [
4040
"Sortable.js",
4141
"Sortable.min.js",
42-
"modular/"
42+
"modular/",
43+
"src/"
4344
],
4445
"keywords": [
4546
"sortable",

src/Sortable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,8 @@ Sortable.utils = {
19601960
nextTick: _nextTick,
19611961
cancelNextTick: _cancelNextTick,
19621962
detectDirection: _detectDirection,
1963-
getChild
1963+
getChild,
1964+
expando
19641965
};
19651966

19661967

0 commit comments

Comments
 (0)