customized-fabric 1.4.6 → 1.4.8

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.
@@ -227,7 +227,7 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
227
227
  const loadedImage = await (0, utils_1.loadImageFromUrl)(url);
228
228
  if (loadedImage) {
229
229
  const mask = await this.getMask();
230
- const { top, left, scaleX, width, angle, color, type } = data;
230
+ const { top, left, scaleX, width, angle, color, type, flipX, flipY } = data;
231
231
  const ratioWidth = (width * scaleX) / (clipPath.width * clipPath.scaleX);
232
232
  const ratioPosition = this.width / clipPath.width;
233
233
  loadedImage.scaleToWidth(ratioWidth * this.width);
@@ -237,8 +237,10 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
237
237
  angle: this.angle + angle,
238
238
  originX: "center",
239
239
  originY: "center",
240
+ flipX,
241
+ flipY,
240
242
  clipPath: mask,
241
- filters: color && type
243
+ filters: type
242
244
  ? (0, utils_1.getImageFilters)(type, { color })
243
245
  : this.imageFilters,
244
246
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",