mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 14:04:28 +00:00
fix: rax 组件无法拖拽的问题
This commit is contained in:
parent
1b966738bc
commit
3a4d47a388
@ -390,15 +390,23 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
|
|||||||
|
|
||||||
getNodeInstance(dom: HTMLElement): NodeInstance<any> | null {
|
getNodeInstance(dom: HTMLElement): NodeInstance<any> | null {
|
||||||
const INTERNAL = '_internal';
|
const INTERNAL = '_internal';
|
||||||
|
let instance: any = dom;
|
||||||
let instance = Instance.get(dom);
|
if (!isElement(instance)) {
|
||||||
|
return {
|
||||||
|
docId: instance.props._leaf.document.id,
|
||||||
|
nodeId: instance.props._leaf.getId(),
|
||||||
|
instance,
|
||||||
|
node: instance.props._leaf,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
instance = Instance.get(dom);
|
||||||
while (instance && instance[INTERNAL]) {
|
while (instance && instance[INTERNAL]) {
|
||||||
if (isValidDesignModeRaxComponentInstance(instance)) {
|
if (isValidDesignModeRaxComponentInstance(instance)) {
|
||||||
// const docId = (instance.props as any).schema.docId;
|
// const docId = (instance.props as any).schema.docId;
|
||||||
return {
|
return {
|
||||||
docId: instance.props._leaf.document.id,
|
docId: instance.props._leaf.document.id,
|
||||||
nodeId: instance.props._leaf.getId(),
|
nodeId: instance.props._leaf.getId(),
|
||||||
instance: instance,
|
instance,
|
||||||
node: instance.props._leaf,
|
node: instance.props._leaf,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user