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 CHANGED
@@ -10331,6 +10331,8 @@ var __decorateClass$e = (decorators, target, key, kind) => {
10331
10331
  result = (decorator(result)) || result;
10332
10332
  return result;
10333
10333
  };
10334
+ const layoutStyle = new Set(Object.keys(modernIdoc.getDefaultLayoutStyle()));
10335
+ const textStyles = new Set(Object.keys(modernIdoc.getDefaultTextStyle()));
10334
10336
  exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10335
10337
  size = new Vector2().on("update", () => {
10336
10338
  this.updateGlobalTransform();
@@ -10491,6 +10493,11 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
10491
10493
  this.requestRedraw();
10492
10494
  break;
10493
10495
  }
10496
+ if (textStyles.has(key) || layoutStyle.has(key)) {
10497
+ if (this.text.isValid()) {
10498
+ this.text.update();
10499
+ }
10500
+ }
10494
10501
  }
10495
10502
  _process(delta) {
10496
10503
  this.foreground.updateFrameIndex();