fabric 6.4.2 → 6.4.3

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.
@@ -463,7 +463,7 @@ class Cache {
463
463
  }
464
464
  const cache = new Cache();
465
465
 
466
- var version = "6.4.2";
466
+ var version = "6.4.3";
467
467
 
468
468
  // use this syntax so babel plugin see this import here
469
469
  const VERSION = version;
@@ -8285,8 +8285,8 @@ const changeObjectWidth = (eventData, transform, x, y) => {
8285
8285
  strokePadding = target.strokeWidth / (target.strokeUniform ? target.scaleX : 1),
8286
8286
  multiplier = isTransformCentered(transform) ? 2 : 1,
8287
8287
  oldWidth = target.width,
8288
- newWidth = Math.ceil(Math.abs(localPoint.x * multiplier / target.scaleX) - strokePadding);
8289
- target.set('width', Math.max(newWidth, 0));
8288
+ newWidth = Math.abs(localPoint.x * multiplier / target.scaleX) - strokePadding;
8289
+ target.set('width', Math.max(newWidth, 1));
8290
8290
  // check against actual target width in case `newWidth` was rejected
8291
8291
  return oldWidth !== target.width;
8292
8292
  }
@@ -20090,6 +20090,12 @@ class FabricText extends StyledText {
20090
20090
  complexity() {
20091
20091
  return 1;
20092
20092
  }
20093
+
20094
+ /**
20095
+ * List of generic font families
20096
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
20097
+ */
20098
+
20093
20099
  /**
20094
20100
  * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
20095
20101
  * @static
@@ -20174,7 +20180,7 @@ _defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
20174
20180
  _defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
20175
20181
  _defineProperty(FabricText, "ownDefaults", textDefaultValues);
20176
20182
  _defineProperty(FabricText, "type", 'Text');
20177
- _defineProperty(FabricText, "genericFonts", ['sans-serif', 'serif', 'cursive', 'fantasy', 'monospace']);
20183
+ _defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
20178
20184
  /* _FROM_SVG_START_ */
20179
20185
  /**
20180
20186
  * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})