-
-
Save jeffgca/4401855 to your computer and use it in GitHub Desktop.
Strawman for improving how context-menu works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cm = require('context-menu'); | |
var Item1 = cm.Item({ | |
label: 'Label', | |
image: data.url('image.png') | |
}); | |
Item1.on('click', function(context) { | |
// ... | |
}); | |
// catch the context menu show event. | |
Item1.on('show', function(context) { | |
// return cm.SHOW | cm.DISABLED | cm.HIDE | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment