mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Store user zoom level in localStorage
This commit is contained in:
parent
085233ab9b
commit
5fc920087b
@ -678,6 +678,11 @@ RED.view = (function() {
|
||||
show: function(n) { return !n.valid }
|
||||
})
|
||||
|
||||
|
||||
var userZoomLevel = parseFloat(RED.settings.getLocal('zoom-level'))
|
||||
if (!isNaN(userZoomLevel)) {
|
||||
scaleFactor = userZoomLevel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1965,6 +1970,7 @@ RED.view = (function() {
|
||||
}
|
||||
function zoomZero() { zoomView(1); }
|
||||
|
||||
|
||||
function zoomView(factor) {
|
||||
var screenSize = [chart.width(),chart.height()];
|
||||
var scrollPos = [chart.scrollLeft(),chart.scrollTop()];
|
||||
@ -1977,6 +1983,7 @@ RED.view = (function() {
|
||||
|
||||
RED.view.navigator.resize();
|
||||
redraw();
|
||||
RED.settings.setLocal('zoom-level', factor.toFixed(1))
|
||||
}
|
||||
|
||||
function selectNone() {
|
||||
|
Loading…
Reference in New Issue
Block a user