diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index ed8c7e25..e925fff7 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -33,6 +33,7 @@ Ox.List List Element draganddropend Fires on drop draganddropenter Fires when entering an item during drag draganddropleave Fires when leaving an item during drag + draganddroppause Fires when the mouse stops during drag draganddropstart Fires when drag starts copy copy paste paste @@ -82,6 +83,7 @@ Ox.List = function(options, self) { that.$content.bindEvent({ dragstart: dragstart, drag: drag, + dragpause: dragpause, dragenter: dragenter, dragleave: dragleave, dragend: dragend @@ -354,7 +356,7 @@ Ox.List = function(options, self) { ) { self.drag = { ids: self.options.selected - } + }; // fixme: shouldn't the target have been // automatically passed already, somewhere? that.triggerEvent('draganddropstart', { @@ -365,48 +367,31 @@ Ox.List = function(options, self) { } function drag(event, e) { - if (self.drag) { - that.triggerEvent('draganddrop', { - ids: self.drag.ids, - _event: e - }); - } + self.drag && that.triggerEvent('draganddrop', { + ids: self.drag.ids, + _event: e + }); + } + + function dragpause(event, e) { + self.drag && that.triggerEvent('draganddroppause', { + ids: self.drag.ids, + _event: e + }); } function dragenter(event, e) { - if (self.drag) { - that.triggerEvent('draganddropenter', { - ids: self.drag.ids, - _event: e - }); - } + self.drag && that.triggerEvent('draganddropenter', { + ids: self.drag.ids, + _event: e + }); } function dragleave(event, e) { - if (self.drag) { - that.triggerEvent('draganddropleave', { - ids: self.drag.ids, - _event: e - }); - } - } - - function dragenter(event, e) { - if (self.drag) { - that.triggerEvent('draganddropenter', { - ids: self.drag.ids, - _event: e - }); - } - } - - function dragleave(event, e) { - if (self.drag) { - that.triggerEvent('draganddropleave', { - ids: self.drag.ids, - _event: e - }); - } + self.drag && that.triggerEvent('draganddropleave', { + ids: self.drag.ids, + _event: e + }); } function dragend(event, e) {