From 959638c2c5b7da0815940b50fbdb517dddfa56e9 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Fri, 8 Apr 2022 21:05:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E4=BF=AE=E5=A4=8Dfix=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E7=9A=84=E7=BB=84=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=90=B8?= =?UTF-8?q?=E9=99=84=E6=95=88=E6=9E=9C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/stage/src/StageDragResize.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/stage/src/StageDragResize.ts b/packages/stage/src/StageDragResize.ts index 367afbfb..7f3d09dc 100644 --- a/packages/stage/src/StageDragResize.ts +++ b/packages/stage/src/StageDragResize.ts @@ -367,6 +367,7 @@ export default class StageDragResize extends EventEmitter { if (!this.target) return {}; const isAbsolute = this.mode === Mode.ABSOLUTE; + const isFixed = this.mode === Mode.FIXED; let { moveableOptions = {} } = this.core.config; @@ -381,8 +382,8 @@ export default class StageDragResize extends EventEmitter { dragArea: false, draggable: true, resizable: true, - snappable: isAbsolute, - snapGap: isAbsolute, + snappable: isAbsolute || isFixed, + snapGap: isAbsolute || isFixed, snapThreshold: 5, snapDigit: 0, throttleDrag: 0,