Add retro-compatibility with previous model - If no "hidden_nodes attributes in the previous view, we set the current HiddenNodes to an empty array
authorrougeronj
Wed, 20 May 2015 10:53:40 +0200
changeset 451 278f8da09c04
parent 450 88e8673aaeeb
child 452 96f84344a70e
Add retro-compatibility with previous model - If no "hidden_nodes attributes in the previous view, we set the current HiddenNodes to an empty array
client/js/renderer/scene.js
--- a/client/js/renderer/scene.js	Wed May 20 10:39:35 2015 +0200
+++ b/client/js/renderer/scene.js	Wed May 20 10:53:40 2015 +0200
@@ -245,7 +245,7 @@
             var view = _this.renkan.project.get("views").last();
             if(view){
                 _this.setScale(view.get("zoom_level"), new paper.Point(view.get("offset")));
-                _this.hiddenNodes = view.get("hidden_nodes");
+                _this.hiddenNodes = view.get("hidden_nodes") || [];
                 _this.hideNodes();
             }
         });