From 834d89e08d9705cb7d49783733c95be6514cabae Mon Sep 17 00:00:00 2001 From: guoapeng Date: Sat, 12 Jul 2025 19:55:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=96=B7=E6=B6=82=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E6=A8=AA=E5=90=91=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/spray/trayGraph/index.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/spray/trayGraph/index.vue b/src/components/spray/trayGraph/index.vue index e996e7f..4e55508 100644 --- a/src/components/spray/trayGraph/index.vue +++ b/src/components/spray/trayGraph/index.vue @@ -45,10 +45,20 @@ let newWidth = (25 - 5 * 2) * zoom let newHeight = (75 - 15 * 2) * zoom const addSelect = () => { + // rect.value = new Konva.Rect({ + // x: 5 * zoom, + // y: 15 * zoom, + // width: (25 - 5 * 2) * zoom, + // height: (75 - 15 * 2) * zoom, + // fill: 'rgba(238,10,36, 0.2)', + // draggable: true, + // }) + + // 取消横向选择区域 rect.value = new Konva.Rect({ - x: 5 * zoom, + x: 0, y: 15 * zoom, - width: (25 - 5 * 2) * zoom, + width: 25 * zoom, height: (75 - 15 * 2) * zoom, fill: 'rgba(238,10,36, 0.2)', draggable: true, @@ -77,7 +87,8 @@ const addSelect = () => { rotateEnabled: false, // 禁用旋转手势 rotationSnaps: [], // 移除旋转刻度 anchorSize: 20, - enabledAnchors: ['top-center', 'bottom-center', 'middle-left', 'middle-right'], // 关键修改 + // enabledAnchors: ['top-center', 'bottom-center', 'middle-left', 'middle-right'], // 关键修改 + enabledAnchors: ['top-center', 'bottom-center'], // 关键修改 boundBoxFunc(oldBoundBox, newBoundBox) { const stageWidth = stage.value.width() const stageHeight = stage.value.height()