mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-04-20 12:28:08 +00:00
fix: 修复无法拖动的问题
This commit is contained in:
parent
29215e9566
commit
2b2de74e0c
@ -135,10 +135,6 @@ export class SimulatorRenderer implements BuiltinSimulatorRenderer {
|
|||||||
|
|
||||||
getClosestNodeInstance(from: any, nodeId?: string): NodeInstance<any> | null {
|
getClosestNodeInstance(from: any, nodeId?: string): NodeInstance<any> | null {
|
||||||
const node = getClosestNodeInstance(from, nodeId);
|
const node = getClosestNodeInstance(from, nodeId);
|
||||||
if (node) {
|
|
||||||
node.nodeId = (node as any).props?.componentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,7 +401,14 @@ function getNodeInstance(dom: HTMLElement): NodeInstance<any> | null {
|
|||||||
}
|
}
|
||||||
instance = instance[INTERNAL].__parentInstance;
|
instance = instance[INTERNAL].__parentInstance;
|
||||||
}
|
}
|
||||||
return parent;
|
if (!parent) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
nodeId: parent.props.componentId,
|
||||||
|
instance: parent
|
||||||
|
}
|
||||||
|
// return parent;
|
||||||
// const instance = fiberNode.stateNode;
|
// const instance = fiberNode.stateNode;
|
||||||
// if (instance) {
|
// if (instance) {
|
||||||
// console.log(instance);
|
// console.log(instance);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user