提交 7f3ee38b 编写于 作者: R RubaXa

#718: * fixed context in 'add' & 'sort' events

上级 2ffa00f6
......@@ -155,7 +155,7 @@ You can also define whether lists can give away, give and keep a copy (`clone`),
Demo:
- http://jsbin.com/naduvo/edit?js,output
- http://jsbin.com/tisequvute/edit?js,output — use of complex logic in the `pull` and` put`
- http://jsbin.com/rusuvot/edit?js,output — use of complex logic in the `pull` and` put`
---
......@@ -347,7 +347,7 @@ The speed at which the window should scroll once the mouse pointer gets within t
---
### Event object
### Event object ([demo](http://jsbin.com/xedusu/edit?js,output))
- to:`HTMLElement` — list, in which moved element.
- from:`HTMLElement` — previous list
......
......@@ -156,7 +156,7 @@
_prepareGroup = function (options) {
function toFn(value, pull) {
if (value === void 0) {
value = true;
value = group.name;
}
if (typeof value === 'function') {
......@@ -1118,8 +1118,10 @@
function _dispatchEvent(sortable, rootEl, name, targetEl, fromEl, startIndex, newIndex) {
sortable = (sortable || rootEl[expando]);
var evt = document.createEvent('Event'),
options = (sortable || rootEl[expando]).options,
options = sortable.options,
onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
evt.initEvent(name, true, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册