mirror of https://github.com/node-red/node-red.git
Account for sidebar width when calculating zoom-to-fit scale
parent
78660d4028
commit
d8519a91c2
|
|
@ -3001,8 +3001,8 @@ RED.view = (function() {
|
|||
var boundingWidth = maxX - minX;
|
||||
var boundingHeight = maxY - minY;
|
||||
|
||||
// Get viewport dimensions
|
||||
var viewportWidth = chart.width();
|
||||
// Get viewport dimensions - accounting for the sidebar if visible
|
||||
var viewportWidth = chart.width() - $("#red-ui-sidebar").width();
|
||||
var viewportHeight = chart.height();
|
||||
|
||||
// Calculate zoom level that fits bounding box in viewport
|
||||
|
|
|
|||
Loading…
Reference in New Issue