From 74940c75a293ec94273e6b1bdfeccfd13d078dbc Mon Sep 17 00:00:00 2001 From: katsuhisa yuasa Date: Mon, 16 Sep 2024 02:52:46 +0900 Subject: [PATCH] update based on a reviewer's comment --- source/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/view.js b/source/view.js index 4c315b3a19..c816410565 100644 --- a/source/view.js +++ b/source/view.js @@ -590,9 +590,9 @@ view.View = class { if (selection && selection.length > 0) { const container = this._element('graph'); let selLeft = Number.POSITIVE_INFINITY; - let selRight = 0; + let selRight = Number.NEGATIVE_INFINITY; let selTop = Number.POSITIVE_INFINITY; - let selBottom = 0; + let selBottom = Number.NEGATIVE_INFINITY; for (const element of selection) { const rect = element.getBoundingClientRect(); selLeft = Math.min(selLeft, rect.left);