diff -r bed069ef446c -r 276042cb477c client/js/renderer/scene.js
--- a/client/js/renderer/scene.js Sat Mar 28 04:28:21 2015 +0100
+++ b/client/js/renderer/scene.js Mon Mar 30 09:53:48 2015 +0200
@@ -242,7 +242,7 @@
_this.setScale(view.get("zoom_level"), new paper.Point(view.get("offset")));
}
});
- if(this.renkan.project.get("views").length > 0 && !isNaN(parseInt(this.renkan.options.default_view))){
+ if(this.renkan.project.get("views").length > 0 && this.renkan.options.save_view){
this.$.find(".Rk-ZoomSetSaved").show();
}
this.$.find(".Rk-CurrentUser").mouseenter(
@@ -392,7 +392,7 @@
);
window.setTimeout(
function() {
- _this.fixSize(true);
+ _this.fixSize();
},
_delay
);
@@ -400,7 +400,7 @@
if (_renkan.options.force_resize) {
$(window).resize(function() {
- _this.fixSize(false);
+ _this.autoScale();
});
}
@@ -516,20 +516,17 @@
'
' +
'<% if (options.show_bins) { %>
«
<% } %>' +
'<% if (options.show_zoom) { %>
<% } %>' +
+ '<% if (options.editor_mode && options.save_view) { %>
">
<% } %>' +
+ '<% if (options.save_view) { %>
">
<% } %>
<% } %>' +
''
),
- fixSize: function(_autoscale) {
-
- if (_autoscale) {
- // If _autoscale, we get the initial view (zoom+offset) set in the project datas.
- if(this.renkan.read_only && !isNaN(parseInt(this.renkan.options.default_view))){
- this.autoScale(this.renkan.project.get("views")[parseInt(this.renkan.options.default_view)]);
- }
- else{
- this.autoScale();
- }
+ fixSize: function() {
+ if( this.renkan.options.default_view && this.renkan.project.get("views").length > 0) {
+ var view = this.renkan.project.get("views").last();
+ this.setScale(view.get("zoom_level"), new paper.Point(view.get("offset")));
+ }
+ else{
+ this.autoScale();
}
},
drawSector: function(_repr, _inR, _outR, _startAngle, _endAngle, _padding, _imgname, _caption) {