-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Makes public the onItemDrop function of MLListItem #83
base: master
Are you sure you want to change the base?
Conversation
- Previous to this, I could not find anyway to hook into an item drop in a subclass of MLListItem
} | ||
}); | ||
|
||
|
||
function MLListItem$init() { | ||
MLListItem.super.init.apply(this, arguments); | ||
this.on('childrenbound', onChildrenBound); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random whitespace?
@@ -1051,7 +1051,9 @@ var MLListItem = module.exports = milo.createComponentClass({ | |||
'dragenter': { subscriber: onDragHover, context: 'owner' }, | |||
'dragover': { subscriber: onDragHover, context: 'owner' }, | |||
'dragleave': { subscriber: onDragOut, context: 'owner' }, | |||
'drop': { subscriber: onItemDrop, context: 'owner' } | |||
'drop': { context: 'owner', subscriber: function() { | |||
this.onItemDrop.apply(this, arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shit code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;)
isDropAllowed
was already exposed. But my use-case is that I allow a drop to occur and then inform the user that they cannot drop the item if it doesn't meet some criteria (A failure dialog is only shown to the user once they commit to dropping the item and not before / on drag over)