add dragangdroppause event

This commit is contained in:
rlx 2011-09-04 22:06:40 +00:00
parent e6e2e0e1d8
commit c123de8513

View file

@ -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) {