mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-08-27 09:19:55 +08:00
fix(editor): 拖拽改变父容器时错乱现象 (#296)
* fix(editor): 拖拽改变父容器时错乱现象 直接拖拽元素改变其父容器时, 会产生错乱的现象。 * Update packages/stage/src/types.ts Co-authored-by: jia000 <398009049@qq.com> Co-authored-by: jia000 <398009049@qq.com>
This commit is contained in:
parent
edcfe685d8
commit
f3c9ba475f
@ -664,7 +664,8 @@ class Editor extends BaseService {
|
||||
|
||||
await stage.select(targetId);
|
||||
|
||||
await stage.update({ config: cloneDeep(target), parentId: parent.id, root });
|
||||
const targetParent = this.getParentById(target.id);
|
||||
await stage.update({ config: cloneDeep(target), parentId: targetParent?.id, root });
|
||||
|
||||
await this.select(newConfig);
|
||||
stage.select(newConfig.id);
|
||||
|
@ -119,7 +119,7 @@ export interface SortEventData {
|
||||
export interface UpdateData {
|
||||
config: MNode;
|
||||
parent?: MContainer;
|
||||
parentId: Id;
|
||||
parentId?: Id;
|
||||
root: MApp;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user