We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fdd318 commit 7a37a49Copy full SHA for 7a37a49
packages/core/src/app.ts
@@ -98,7 +98,18 @@ export class App extends BaseService<EventArgs> {
98
this.render();
99
}
100
101
- public _update(): void {}
+ public update(...nodes: KonvaNode[]): void {
102
+ this._update(...nodes);
103
+ this.emit('node:updated', { nodes });
104
+ }
105
+
106
+ public _update(...nodes: KonvaNode[]): void {
107
+ nodes.forEach((node) => {
108
+ const originNode = this.getNodeById(node.attrs.id);
109
+ originNode?.setAttrs(node.attrs);
110
+ });
111
+ this.render();
112
113
114
public getNodeById(id: string): KonvaNode | undefined {
115
return this.getNodes((node) => node.id() === id)?.[0];
0 commit comments