@leapfrog/interactive-canvas 2.0.20-beta-3 → 2.0.20-beta-4

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.
@@ -1224,7 +1224,9 @@ class Border extends AbstractCanvasObject {
1224
1224
  top: 0,
1225
1225
  left: 0,
1226
1226
  width: this.canvas.getDimensions().widthPx - this.strokeWidth$.value,
1227
- height: this.canvas.getDimensions().heightPx - this.strokeWidth$.value
1227
+ height: this.canvas.getDimensions().heightPx - this.strokeWidth$.value,
1228
+ selectable: false,
1229
+ evented: false
1228
1230
  });
1229
1231
  }
1230
1232
  /**
@@ -3358,8 +3360,6 @@ class AbstractInteractiveCanvas {
3358
3360
  }
3359
3361
  setMultiSelect(value) {
3360
3362
  this.fabricCanvas.selection = value;
3361
- this.fabricCanvas.selectionColor = value ? "rgba(0,0,0,0.1)" : "transparent"; // Adjust selection color
3362
- this.fabricCanvas.selectionBorderColor = "transparent";
3363
3363
  this.fabricCanvas.selectionKey = value ? "shiftKey" : null;
3364
3364
  }
3365
3365
  /**
@@ -3601,12 +3601,7 @@ class AbstractInteractiveCanvas {
3601
3601
  }
3602
3602
  findObject(id) {
3603
3603
  //Don't use strict compare here. fabric ids are numbers while ad builder ids are strings... mostly.
3604
- //return _.find(this.objects$.value, (object: AbstractCanvasObject<any>) => object.getId() == id)!;
3605
- const foundObject = _.find(this.objects$.value, (object) => object.getId() == id);
3606
- if (!foundObject) {
3607
- throw new Error(`Object with id [${id}] not found`);
3608
- }
3609
- return foundObject;
3604
+ return _.find(this.objects$.value, (object) => object.getId() == id);
3610
3605
  }
3611
3606
  /**
3612
3607
  * Reset zoom and canvas dimensions to 1:1 scale, execute a function, then return the canvas to
@@ -3687,7 +3682,6 @@ class AbstractInteractiveCanvas {
3687
3682
  class SelectionData {
3688
3683
  constructor(objects) {
3689
3684
  this.objects = objects;
3690
- console.log(objects[0], "objects");
3691
3685
  this.empty = this.objects.length < 1;
3692
3686
  const selectedObject = this.objects[0];
3693
3687
  this.isText = (selectedObject === null || selectedObject === void 0 ? void 0 : selectedObject.getType()) === ObjectType.TEXT
@@ -1245,7 +1245,9 @@ class Border extends AbstractCanvasObject {
1245
1245
  top: 0,
1246
1246
  left: 0,
1247
1247
  width: this.canvas.getDimensions().widthPx - this.strokeWidth$.value,
1248
- height: this.canvas.getDimensions().heightPx - this.strokeWidth$.value
1248
+ height: this.canvas.getDimensions().heightPx - this.strokeWidth$.value,
1249
+ selectable: false,
1250
+ evented: false
1249
1251
  });
1250
1252
  }
1251
1253
  /**
@@ -3379,8 +3381,6 @@ class AbstractInteractiveCanvas {
3379
3381
  }
3380
3382
  setMultiSelect(value) {
3381
3383
  this.fabricCanvas.selection = value;
3382
- this.fabricCanvas.selectionColor = value ? "rgba(0,0,0,0.1)" : "transparent"; // Adjust selection color
3383
- this.fabricCanvas.selectionBorderColor = "transparent";
3384
3384
  this.fabricCanvas.selectionKey = value ? "shiftKey" : null;
3385
3385
  }
3386
3386
  /**
@@ -3622,12 +3622,7 @@ class AbstractInteractiveCanvas {
3622
3622
  }
3623
3623
  findObject(id) {
3624
3624
  //Don't use strict compare here. fabric ids are numbers while ad builder ids are strings... mostly.
3625
- //return _.find(this.objects$.value, (object: AbstractCanvasObject<any>) => object.getId() == id)!;
3626
- const foundObject = _.find(this.objects$.value, (object) => object.getId() == id);
3627
- if (!foundObject) {
3628
- throw new Error(`Object with id [${id}] not found`);
3629
- }
3630
- return foundObject;
3625
+ return _.find(this.objects$.value, (object) => object.getId() == id);
3631
3626
  }
3632
3627
  /**
3633
3628
  * Reset zoom and canvas dimensions to 1:1 scale, execute a function, then return the canvas to
@@ -3708,7 +3703,6 @@ class AbstractInteractiveCanvas {
3708
3703
  class SelectionData {
3709
3704
  constructor(objects) {
3710
3705
  this.objects = objects;
3711
- console.log(objects[0], "objects");
3712
3706
  this.empty = this.objects.length < 1;
3713
3707
  const selectedObject = this.objects[0];
3714
3708
  this.isText = (selectedObject === null || selectedObject === void 0 ? void 0 : selectedObject.getType()) === exports.ObjectType.TEXT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leapfrog/interactive-canvas",
3
- "version": "2.0.20-beta-3",
3
+ "version": "2.0.20-beta-4",
4
4
  "description": "Leapfrog interactive canvas",
5
5
  "files": [
6
6
  "dist"