--- a/client/js/renderer/scene.js Fri Sep 18 16:37:26 2015 +0200
+++ b/client/js/renderer/scene.js Tue Sep 22 15:14:10 2015 +0200
@@ -29,7 +29,7 @@
this.node_layer = new paper.Layer();
this.buttons_layer = new paper.Layer();
this.delete_list = [];
- this.redrawActive = true;
+ this.redrawActive = false;
if (_renkan.options.show_minimap) {
this.minimap = {
@@ -266,9 +266,9 @@
paper.view.onResize = function(_event) {
var _ratio,
- newWidth = _event.width,
- newHeight = _event.height;
-
+ newWidth = _event.size._width,
+ newHeight = _event.size._height;
+
if (_this.minimap) {
_this.minimap.topleft = paper.view.bounds.bottomRight.subtract(_this.minimap.size);
_this.minimap.rectangle.fitBounds(_this.minimap.topleft.subtract([2,2]), _this.minimap.size.add([4,4]));
@@ -282,7 +282,6 @@
} else {
_ratio = ratioW;
}
-
_this.view.resizeZoom(ratioW, ratioH, _ratio);
_this.redraw();
@@ -329,7 +328,13 @@
break;
}
});
-
+
+ this.renkan.project.on("loaded", function(){
+ Backbone.history.start();
+ _this.redrawActive = true;
+ _thRedraw();
+ });
+
this.renkan.project.on("change:loadingStatus", function(){
if (_this.renkan.project.get("loadingStatus")){
var animate = _this.$.find(".loader").addClass("run");
@@ -337,16 +342,12 @@
_this.$.find(".loader").hide(250);
}, 3000);
}
- else{
- Backbone.history.start();
- _thRedraw();
- }
});
this.renkan.project.on("add:users remove:users", _thRedrawUsers);
this.renkan.project.on("add:views remove:views", function(_node) {
- if(_this.renkan.project.get('views').length > 0) {
+ if(_this.renkan.project.get('views').length > 1) {
_this.$.find(".Rk-ZoomSetSaved").show();
}
else {
@@ -1285,7 +1286,6 @@
sizeAft = sizeBef+300;
foldBinsButton.html("»");
}
- _this.view.resizeZoom(1, 1, (sizeAft/sizeBef));
},
save: function() { },
open: function() { }