Skip to content

Commit

Permalink
Fix selection blocks with single click on max zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
cavearr committed Nov 9, 2024
1 parent dd905f5 commit 65458cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/scripts/graphics/joint.selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ joint.ui.SelectionView = Backbone.View.extend({
top: this._offsetY,
});
/*-- unComment for debugging purpouses
*/
*
console.table({'client':{x:this._clientX,y:this._clientY},
'scroll':{x:paperScrollLeft,y:paperScrollTop},
'offsetP':{x:paperOffset.left,y:paperOffset.top},
'offset':{x:this._offsetX,y:this._offsetY}
});
*/
},


Expand Down
2 changes: 1 addition & 1 deletion app/scripts/services/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ angular.module('icestudio')
function checkInsideViewBox(view, x, y) {
let $box = $(view.$box[0]);
let position = $box.position();
let rbox = g.rect(position.left, position.top, $box.width(), $box.height());
let rbox = g.rect(position.left, position.top, $box.width()*state.zoom, $box.height()*state.zoom);
return rbox.containsPoint({
x: x * state.zoom + state.pan.x,
y: y * state.zoom + state.pan.y
Expand Down

0 comments on commit 65458cd

Please sign in to comment.