mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 置顶计算错误
This commit is contained in:
parent
ec8e8a17d2
commit
3f833d41f3
@ -705,9 +705,9 @@ class Editor extends BaseService {
|
||||
brothers.splice(index, 1);
|
||||
|
||||
if (offset === LayerOffset.TOP) {
|
||||
brothers.splice(isRelative ? 0 : brothers.length - 1, 0, node);
|
||||
brothers.splice(isRelative ? 0 : brothers.length, 0, node);
|
||||
} else if (offset === LayerOffset.BOTTOM) {
|
||||
brothers.splice(isRelative ? brothers.length - 1 : 0, 0, node);
|
||||
brothers.splice(isRelative ? brothers.length : 0, 0, node);
|
||||
} else {
|
||||
brothers.splice(index + (isRelative ? -offset : offset), 0, node);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user