Skip to content

Conversation

Richard-Walton
Copy link
Contributor

  • Previous to this, I could not find anyway to hook into an item drop in a subclass of MLListItem

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)

- 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);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random whitespace?

'dragleave': { subscriber: onDragOut, context: 'owner' },
'drop': { subscriber: onItemDrop, context: 'owner' }
'drop': { context: 'owner', subscriber: function() {
this.onItemDrop.apply(this, arguments);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shit code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants