Skip to content

Commit bffd01f

Browse files
committed
Update scenes.tpl
Fix of scenes zoom
1 parent bb0198b commit bffd01f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/scenes/scenes.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ $(".draggable" ).draggable({ cursor: "move", snap: true , snapTolerance: 5, grid
655655
let maxElementY = 0;
656656
657657
658-
$('.element_state').each(function() {
659-
let x = $( this ).position().left+$( this ).width()+10;
660-
let y = $( this ).position().top+$( this ).height()+10;
658+
$('.scene_element').each(function() {
659+
let x = $( this ).get(0).getBoundingClientRect().right+20;
660+
let y = $( this ).get(0).getBoundingClientRect().bottom+20;
661661
if (x>maxElementX) maxElementX=x;
662662
if (y>maxElementY) maxElementY=y;
663663
});

0 commit comments

Comments
 (0)