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 02d3d03 commit a675ebfCopy full SHA for a675ebf
src/classes/shape.ts
@@ -51,8 +51,11 @@ export class Shape {
51
hasCreationId: boolean;
52
contentTypeMap: typeof ContentTypeMap;
53
subtype: ElementSubtype;
54
+ shape: ImportedElement;
55
56
constructor(shape: ImportedElement, targetType: ShapeTargetType) {
57
+ this.shape = shape;
58
+
59
this.mode = shape.mode;
60
this.name = shape.name;
61
this.targetType = targetType;
@@ -88,6 +91,10 @@ export class Shape {
88
91
}
89
92
90
93
async setTargetElement(): Promise<void> {
94
+ if (!this.sourceElement) {
95
+ console.log(this.shape);
96
+ throw 'No source element for shape ' + this.name;
97
+ }
98
this.targetElement = this.sourceElement.cloneNode(true) as XmlElement;
99
100
0 commit comments