add dragangdroppause event
This commit is contained in:
parent
e6e2e0e1d8
commit
c123de8513
1 changed files with 22 additions and 37 deletions
|
@ -33,6 +33,7 @@ Ox.List <f:Ox.Element> 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 <i> 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) {
|
||||
|
|
Loading…
Reference in a new issue