mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 修复fix布局的组件没有吸附效果问题
This commit is contained in:
parent
4d7b135e50
commit
959638c2c5
@ -367,6 +367,7 @@ export default class StageDragResize extends EventEmitter {
|
|||||||
if (!this.target) return {};
|
if (!this.target) return {};
|
||||||
|
|
||||||
const isAbsolute = this.mode === Mode.ABSOLUTE;
|
const isAbsolute = this.mode === Mode.ABSOLUTE;
|
||||||
|
const isFixed = this.mode === Mode.FIXED;
|
||||||
|
|
||||||
let { moveableOptions = {} } = this.core.config;
|
let { moveableOptions = {} } = this.core.config;
|
||||||
|
|
||||||
@ -381,8 +382,8 @@ export default class StageDragResize extends EventEmitter {
|
|||||||
dragArea: false,
|
dragArea: false,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
snappable: isAbsolute,
|
snappable: isAbsolute || isFixed,
|
||||||
snapGap: isAbsolute,
|
snapGap: isAbsolute || isFixed,
|
||||||
snapThreshold: 5,
|
snapThreshold: 5,
|
||||||
snapDigit: 0,
|
snapDigit: 0,
|
||||||
throttleDrag: 0,
|
throttleDrag: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user