fix(editor): 修复fix布局的组件没有吸附效果问题

This commit is contained in:
roymondchen 2022-04-08 21:05:58 +08:00 committed by jia000
parent 4d7b135e50
commit 959638c2c5

View File

@ -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,