Created
February 7, 2013 13:57
-
-
Save bartvde/4731067 to your computer and use it in GitHub Desktop.
gxp layertree checkbox click
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
diff --git a/src/script/plugins/LayerTree.js b/src/script/plugins/LayerTree.js | |
index 7c04c07..b53c701 100644 | |
--- a/src/script/plugins/LayerTree.js | |
+++ b/src/script/plugins/LayerTree.js | |
@@ -223,6 +223,12 @@ gxp.plugins.LayerTree = Ext.extend(gxp.plugins.Tool, { | |
} | |
attr.listeners = { | |
rendernode: function(node) { | |
+ var cb = node.getUI().checkbox; | |
+ if (cb && Ext.get(cb).getAttribute('type') === 'checkbox') { | |
+ Ext.get(cb).on('click', function() { | |
+ alert('click'); | |
+ }); | |
+ } | |
if (record === this.target.selectedLayer) { | |
node.select(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment