From 65458cd64a4ed91b7ddb79a36f975036ee214a31 Mon Sep 17 00:00:00 2001 From: Carlos Venegas Date: Sat, 9 Nov 2024 09:49:24 +0100 Subject: [PATCH] Fix selection blocks with single click on max zoom --- app/scripts/graphics/joint.selection.js | 4 ++-- app/scripts/services/graph.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scripts/graphics/joint.selection.js b/app/scripts/graphics/joint.selection.js index 4d2f6657..26923d0d 100644 --- a/app/scripts/graphics/joint.selection.js +++ b/app/scripts/graphics/joint.selection.js @@ -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} }); - + */ }, diff --git a/app/scripts/services/graph.js b/app/scripts/services/graph.js index 9dde6a99..80741fec 100644 --- a/app/scripts/services/graph.js +++ b/app/scripts/services/graph.js @@ -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