modern-canvas 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +26 -2
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -16
- package/dist/index.mjs +26 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -9312,6 +9312,14 @@ class BaseElement2DBackground extends BaseElement2DFill {
|
|
|
9312
9312
|
modernIdoc.isNone(properties) ? void 0 : modernIdoc.normalizeBackground(properties)
|
|
9313
9313
|
);
|
|
9314
9314
|
}
|
|
9315
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
9316
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
9317
|
+
switch (key) {
|
|
9318
|
+
case "fillWithShape":
|
|
9319
|
+
this.parent.requestRedraw();
|
|
9320
|
+
break;
|
|
9321
|
+
}
|
|
9322
|
+
}
|
|
9315
9323
|
}
|
|
9316
9324
|
__decorateClass$r([
|
|
9317
9325
|
modernIdoc.property()
|
|
@@ -9332,6 +9340,14 @@ class BaseElement2DForeground extends BaseElement2DFill {
|
|
|
9332
9340
|
modernIdoc.isNone(properties) ? void 0 : modernIdoc.normalizeForeground(properties)
|
|
9333
9341
|
);
|
|
9334
9342
|
}
|
|
9343
|
+
_updateProperty(key, value, oldValue, declaration) {
|
|
9344
|
+
super._updateProperty(key, value, oldValue, declaration);
|
|
9345
|
+
switch (key) {
|
|
9346
|
+
case "fillWithShape":
|
|
9347
|
+
this.parent.requestRedraw();
|
|
9348
|
+
break;
|
|
9349
|
+
}
|
|
9350
|
+
}
|
|
9335
9351
|
}
|
|
9336
9352
|
__decorateClass$q([
|
|
9337
9353
|
modernIdoc.property()
|
|
@@ -9939,7 +9955,11 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
|
|
|
9939
9955
|
}
|
|
9940
9956
|
if (this._background.canDraw()) {
|
|
9941
9957
|
this._tree?.log(this.name, "background drawing");
|
|
9942
|
-
this.
|
|
9958
|
+
if (this._background.fillWithShape) {
|
|
9959
|
+
this._shape.draw();
|
|
9960
|
+
} else {
|
|
9961
|
+
this._shape.drawRect();
|
|
9962
|
+
}
|
|
9943
9963
|
this._background.draw();
|
|
9944
9964
|
}
|
|
9945
9965
|
if (this._fill.canDraw()) {
|
|
@@ -9954,7 +9974,11 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
|
|
|
9954
9974
|
}
|
|
9955
9975
|
if (this._foreground.canDraw()) {
|
|
9956
9976
|
this._tree?.log(this.name, "foreground drawing");
|
|
9957
|
-
this.
|
|
9977
|
+
if (this._foreground.fillWithShape) {
|
|
9978
|
+
this._shape.draw();
|
|
9979
|
+
} else {
|
|
9980
|
+
this._shape.drawRect();
|
|
9981
|
+
}
|
|
9958
9982
|
this._foreground.draw();
|
|
9959
9983
|
}
|
|
9960
9984
|
if (this._text.canDraw()) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1953,11 +1953,13 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1953
1953
|
declare class BaseElement2DBackground extends BaseElement2DFill {
|
|
1954
1954
|
fillWithShape: NormalizedBackground['fillWithShape'];
|
|
1955
1955
|
setProperties(properties?: Background): this;
|
|
1956
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1956
1957
|
}
|
|
1957
1958
|
|
|
1958
1959
|
declare class BaseElement2DForeground extends BaseElement2DFill {
|
|
1959
1960
|
fillWithShape: NormalizedForeground['fillWithShape'];
|
|
1960
1961
|
setProperties(properties?: Foreground): this;
|
|
1962
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1961
1963
|
}
|
|
1962
1964
|
|
|
1963
1965
|
declare class BaseElement2DOutline extends BaseElement2DFill {
|
package/dist/index.d.mts
CHANGED
|
@@ -1953,11 +1953,13 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1953
1953
|
declare class BaseElement2DBackground extends BaseElement2DFill {
|
|
1954
1954
|
fillWithShape: NormalizedBackground['fillWithShape'];
|
|
1955
1955
|
setProperties(properties?: Background): this;
|
|
1956
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1956
1957
|
}
|
|
1957
1958
|
|
|
1958
1959
|
declare class BaseElement2DForeground extends BaseElement2DFill {
|
|
1959
1960
|
fillWithShape: NormalizedForeground['fillWithShape'];
|
|
1960
1961
|
setProperties(properties?: Foreground): this;
|
|
1962
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1961
1963
|
}
|
|
1962
1964
|
|
|
1963
1965
|
declare class BaseElement2DOutline extends BaseElement2DFill {
|
package/dist/index.d.ts
CHANGED
|
@@ -1953,11 +1953,13 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1953
1953
|
declare class BaseElement2DBackground extends BaseElement2DFill {
|
|
1954
1954
|
fillWithShape: NormalizedBackground['fillWithShape'];
|
|
1955
1955
|
setProperties(properties?: Background): this;
|
|
1956
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1956
1957
|
}
|
|
1957
1958
|
|
|
1958
1959
|
declare class BaseElement2DForeground extends BaseElement2DFill {
|
|
1959
1960
|
fillWithShape: NormalizedForeground['fillWithShape'];
|
|
1960
1961
|
setProperties(properties?: Foreground): this;
|
|
1962
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1961
1963
|
}
|
|
1962
1964
|
|
|
1963
1965
|
declare class BaseElement2DOutline extends BaseElement2DFill {
|