'hideButtons' function can be call by view hides the nodes. So we have to check if the button is drawn (i.e. sector is defined) first before hiding it.
authorrougeronj
Thu, 18 Jun 2015 17:17:11 +0200
changeset 505 a6a3b0e3da57
parent 504 3329b413db18
child 506 460de050f800
'hideButtons' function can be call by view hides the nodes. So we have to check if the button is drawn (i.e. sector is defined) first before hiding it.
client/js/renderer/basebutton.js
--- a/client/js/renderer/basebutton.js	Thu Jun 18 16:54:57 2015 +0200
+++ b/client/js/renderer/basebutton.js	Thu Jun 18 17:17:11 2015 +0200
@@ -18,7 +18,9 @@
             this.sector.show();
         },
         hide: function() {
-            this.sector.hide();
+            if (this.sector){
+                this.sector.hide();                
+            }
         },
         select: function() {
             this.sector.select();