mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 10:27:22 +00:00
fix: 复制增加磁贴大小位置信息
This commit is contained in:
parent
85a4081c79
commit
efd033c5e5
@ -436,7 +436,16 @@ const builtinComponentActions: ComponentAction[] = [
|
|||||||
if (parent) {
|
if (parent) {
|
||||||
const newNode = doc.insertNode(parent, node, index + 1, true);
|
const newNode = doc.insertNode(parent, node, index + 1, true);
|
||||||
newNode.select();
|
newNode.select();
|
||||||
if (node.getRGL().isRGL) {
|
const { isRGL, rglNode } = node.getRGL();
|
||||||
|
if (isRGL) {
|
||||||
|
// 复制layout信息
|
||||||
|
let layout = rglNode.getPropValue('layout');
|
||||||
|
let curLayout = layout.filter((item) => item.i === node.getPropValue('fieldId'));
|
||||||
|
layout.push({
|
||||||
|
...curLayout[0],
|
||||||
|
i: newNode.getPropValue('fieldId'),
|
||||||
|
});
|
||||||
|
rglNode.setPropValue('layout', layout);
|
||||||
// 如果是磁贴块复制,则需要滚动到影响位置
|
// 如果是磁贴块复制,则需要滚动到影响位置
|
||||||
setTimeout(() => newNode.document.simulator?.scrollToNode(newNode), 10);
|
setTimeout(() => newNode.document.simulator?.scrollToNode(newNode), 10);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,9 @@ import clipboard from './clipboard';
|
|||||||
|
|
||||||
function isInLiveEditing() {
|
function isInLiveEditing() {
|
||||||
if (globalContext.has(Editor)) {
|
if (globalContext.has(Editor)) {
|
||||||
return Boolean(globalContext.get(Editor).get('designer')?.project?.simulator?.liveEditing?.editing);
|
return Boolean(
|
||||||
|
globalContext.get(Editor).get('designer')?.project?.simulator?.liveEditing?.editing,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user