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
|
draganddropend <!> Fires on drop
|
||||||
draganddropenter <!> Fires when entering an item during drag
|
draganddropenter <!> Fires when entering an item during drag
|
||||||
draganddropleave <!> Fires when leaving 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
|
draganddropstart <i> Fires when drag starts
|
||||||
copy <!> copy
|
copy <!> copy
|
||||||
paste <!> paste
|
paste <!> paste
|
||||||
|
@ -82,6 +83,7 @@ Ox.List = function(options, self) {
|
||||||
that.$content.bindEvent({
|
that.$content.bindEvent({
|
||||||
dragstart: dragstart,
|
dragstart: dragstart,
|
||||||
drag: drag,
|
drag: drag,
|
||||||
|
dragpause: dragpause,
|
||||||
dragenter: dragenter,
|
dragenter: dragenter,
|
||||||
dragleave: dragleave,
|
dragleave: dragleave,
|
||||||
dragend: dragend
|
dragend: dragend
|
||||||
|
@ -354,7 +356,7 @@ Ox.List = function(options, self) {
|
||||||
) {
|
) {
|
||||||
self.drag = {
|
self.drag = {
|
||||||
ids: self.options.selected
|
ids: self.options.selected
|
||||||
}
|
};
|
||||||
// fixme: shouldn't the target have been
|
// fixme: shouldn't the target have been
|
||||||
// automatically passed already, somewhere?
|
// automatically passed already, somewhere?
|
||||||
that.triggerEvent('draganddropstart', {
|
that.triggerEvent('draganddropstart', {
|
||||||
|
@ -365,48 +367,31 @@ Ox.List = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function drag(event, e) {
|
function drag(event, e) {
|
||||||
if (self.drag) {
|
self.drag && that.triggerEvent('draganddrop', {
|
||||||
that.triggerEvent('draganddrop', {
|
ids: self.drag.ids,
|
||||||
ids: self.drag.ids,
|
_event: e
|
||||||
_event: e
|
});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
function dragpause(event, e) {
|
||||||
|
self.drag && that.triggerEvent('draganddroppause', {
|
||||||
|
ids: self.drag.ids,
|
||||||
|
_event: e
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function dragenter(event, e) {
|
function dragenter(event, e) {
|
||||||
if (self.drag) {
|
self.drag && that.triggerEvent('draganddropenter', {
|
||||||
that.triggerEvent('draganddropenter', {
|
ids: self.drag.ids,
|
||||||
ids: self.drag.ids,
|
_event: e
|
||||||
_event: e
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dragleave(event, e) {
|
function dragleave(event, e) {
|
||||||
if (self.drag) {
|
self.drag && that.triggerEvent('draganddropleave', {
|
||||||
that.triggerEvent('draganddropleave', {
|
ids: self.drag.ids,
|
||||||
ids: self.drag.ids,
|
_event: e
|
||||||
_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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dragend(event, e) {
|
function dragend(event, e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue