mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
feat: add scrollToNode for simulator host (#1075)
This commit is contained in:
parent
6ee6b07a10
commit
0bcd9ff782
@ -1,7 +1,8 @@
|
||||
import {
|
||||
BuiltinSimulatorHost,
|
||||
} from '@alilc/lowcode-designer';
|
||||
import { simulatorHostSymbol } from './symbols';
|
||||
import { simulatorHostSymbol, nodeSymbol } from './symbols';
|
||||
import type Node from './node';
|
||||
|
||||
export default class SimulatorHost {
|
||||
private readonly [simulatorHostSymbol]: BuiltinSimulatorHost;
|
||||
@ -51,6 +52,14 @@ export default class SimulatorHost {
|
||||
return this[simulatorHostSymbol].get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* scroll to specific node
|
||||
* @param node
|
||||
*/
|
||||
scrollToNode(node: Node) {
|
||||
this[simulatorHostSymbol].scrollToNode(node[nodeSymbol]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新渲染画布
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user