Created
November 15, 2013 08:08
-
-
Save josephcc/7480812 to your computer and use it in GitHub Desktop.
This file contains 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
define([ | |
'flight/lib/component', | |
], function(defineComponent) { | |
return defineComponent(function() { | |
this.screenViewerHitMenu = function (e, data) { | |
var x = data.position.x; | |
var y = data.position.y; | |
var html; | |
html += '<ul class="dropdown-menu" role="menu">'; | |
data.hits.forEach( function(element, index, array) { | |
html += '<li role="presentation"><a role="menuitem" tabindex="-1" href="#">'; | |
html += element.className; | |
html += '</a></li>'; | |
}); | |
html += "</ul>"; | |
this.$node.append($(html)); | |
this.$node.css('left', x); | |
this.$node.css('top', y); | |
} | |
this.after('initialize', function() { | |
this.on(document, 'uiScreenViewerHitMenu', this.screenViewerHitMenu); | |
}); | |
}); | |
}); |
itszero
commented
Nov 15, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment