mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 09:48:44 +00:00
Support id and name attrs in ImageNode
This commit is contained in:
1 parent
834782f542
commit
318f75cb58
1 file changed
+6
@@ -18,6 +18,8 @@ interface ImageNodeContructor {
|
||||
transform?: TransformationData;
|
||||
mediaLayerRef: Konva.Layer;
|
||||
selectionManagerRef: SelectionManager;
|
||||
id?: string;
|
||||
name?: string;
|
||||
loaded: () => Promise<void>;
|
||||
}
|
||||
|
||||
@@ -36,6 +38,8 @@ export class ImageNode extends NetworkedNode {
|
||||
selectionManagerRef,
|
||||
loaded,
|
||||
imageBitmap,
|
||||
id,
|
||||
name
|
||||
}: ImageNodeContructor) {
|
||||
// kNodes need to be created first to guaruntee
|
||||
// that it is not undefined in parent's context
|
||||
@@ -49,6 +53,8 @@ export class ImageNode extends NetworkedNode {
|
||||
...transform,
|
||||
draggable: true,
|
||||
strokeScaleEnabled: false,
|
||||
id: id,
|
||||
name: name,
|
||||
});
|
||||
super({
|
||||
selectionManagerRef: selectionManagerRef,
|
||||
|
||||
Reference in new issue
Block a user