![JAR search and dependency download from the Maven repository](/logo.png)
webapp.scripts.behaviors.legend-click.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of willow-servers Show documentation
Show all versions of willow-servers Show documentation
Willow operational servlets and servers
The newest version!
// Stop event propagation whenever graph legen is clicked
// this makes sure we don't reset graphs unnecessarily when zooming
Box.Application.addBehavior('legend-click', function(context) {
var $, moduleEl;
return {
init: function() {
$ = context.getGlobal("jQuery");
moduleEl = context.getElement();
},
onmousedown: function(e, element, elementType) {
if (e.target && (e.target.nodeName === 'circle' || e.target.nodeName === 'text')) {
e.stopPropagation();
}
}
};
});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy