modern-canvas 0.12.1 → 0.12.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 +7 -0
- package/dist/index.js +32 -32
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineProperty, Observable, Reactivable, parseColor, property, RawWeakMap as RawWeakMap$1, isGradient, isColorFillObject, clearUndef, idGenerator, normalizeFill, isNone, normalizeBackground, normalizeForeground, normalizeOutline, normalizeShadow, normalizeShape, getDefaultStyle, normalizeText, normalizeTextContent } from 'modern-idoc';
|
|
1
|
+
import { defineProperty, Observable, Reactivable, parseColor, property, RawWeakMap as RawWeakMap$1, isGradient, isColorFillObject, clearUndef, idGenerator, normalizeFill, isNone, normalizeBackground, normalizeForeground, normalizeOutline, normalizeShadow, normalizeShape, getDefaultStyle, normalizeText, normalizeTextContent, getDefaultTextStyle, getDefaultLayoutStyle } from 'modern-idoc';
|
|
2
2
|
import { fonts } from 'modern-font';
|
|
3
3
|
import { extend } from 'colord';
|
|
4
4
|
import namesPlugin from 'colord/plugins/names';
|
|
@@ -10325,6 +10325,8 @@ var __decorateClass$e = (decorators, target, key, kind) => {
|
|
|
10325
10325
|
result = (decorator(result)) || result;
|
|
10326
10326
|
return result;
|
|
10327
10327
|
};
|
|
10328
|
+
const layoutStyle = new Set(Object.keys(getDefaultLayoutStyle()));
|
|
10329
|
+
const textStyles = new Set(Object.keys(getDefaultTextStyle()));
|
|
10328
10330
|
let BaseElement2D = class extends Node2D {
|
|
10329
10331
|
size = new Vector2().on("update", () => {
|
|
10330
10332
|
this.updateGlobalTransform();
|
|
@@ -10485,6 +10487,11 @@ let BaseElement2D = class extends Node2D {
|
|
|
10485
10487
|
this.requestRedraw();
|
|
10486
10488
|
break;
|
|
10487
10489
|
}
|
|
10490
|
+
if (textStyles.has(key) || layoutStyle.has(key)) {
|
|
10491
|
+
if (this.text.isValid()) {
|
|
10492
|
+
this.text.update();
|
|
10493
|
+
}
|
|
10494
|
+
}
|
|
10488
10495
|
}
|
|
10489
10496
|
_process(delta) {
|
|
10490
10497
|
this.foreground.updateFrameIndex();
|