customized-fabric 1.5.2 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -48,6 +48,7 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
48
48
  ...rest,
49
49
  layerId: options?.personalizeId ?? options?.layerId,
50
50
  objectCaching: false,
51
+ pathVisible: !(options?.isOriginal || options?.hideStroke),
51
52
  });
52
53
  this.autoChangeFontSize(0.1);
53
54
  this.calculateTextPath(this.width, this.height);
@@ -172,6 +173,7 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
172
173
  objectCaching: false,
173
174
  originX: "center",
174
175
  originY: "center",
176
+ visible: this.pathVisible,
175
177
  });
176
178
  this.pathObject = path;
177
179
  const pathInfo = fabric_1.fabric.util?.getPathSegmentsInfo?.(path.path);
@@ -230,9 +230,9 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
230
230
  },
231
231
  loadCustomizedImage: async function (image) {
232
232
  if (image) {
233
- const { url, data, clipPath } = image;
233
+ const { url, filteredUrl, data, clipPath } = image;
234
234
  if (url && data && clipPath) {
235
- const loadedImage = await (0, utils_1.loadImageFromUrl)(url);
235
+ const loadedImage = await (0, utils_1.loadImageFromUrl)(filteredUrl ?? url);
236
236
  if (loadedImage) {
237
237
  const mask = await this.getMask();
238
238
  const { top, left, scaleX, width, angle, flipX, flipY, settings = {}, } = data;
@@ -18,6 +18,7 @@ export interface IClipPathOptions {
18
18
  }
19
19
  export interface IImageOptions {
20
20
  url: string;
21
+ filteredUrl?: string;
21
22
  data: {
22
23
  originX: string;
23
24
  originY: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",