@threedddplus/logoeditor 0.0.131 → 0.0.133

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.
@@ -4244,6 +4244,9 @@ var converterSlice = function converterSlice(set, get) {
4244
4244
  (_use3dddPlus$getState2 = use3dddPlus.getState()) == null ? void 0 : (_use3dddPlus$getState3 = _use3dddPlus$getState2.popupCanv) == null ? void 0 : _use3dddPlus$getState3.add(rect);
4245
4245
  }
4246
4246
  }
4247
+ /*loadedObject.set({
4248
+ perPixelTargetFind: true ,
4249
+ })*/
4247
4250
  canvas.add(loadedObject).renderAll();
4248
4251
  canvas.centerObject(loadedObject);
4249
4252
  canvas.setActiveObject(loadedObject);
@@ -4254,6 +4257,14 @@ var converterSlice = function converterSlice(set, get) {
4254
4257
  loading: false
4255
4258
  });
4256
4259
  use3dddPlus.getState().popUpCanvasUpdateModification(true);
4260
+ var _objects = canvas.getActiveObjects();
4261
+ _objects.forEach(function (element) {
4262
+ if (element.type !== "line") {
4263
+ element.set({
4264
+ perPixelTargetFind: true
4265
+ });
4266
+ }
4267
+ });
4257
4268
  });
4258
4269
  };
4259
4270
  var getDesignConceptSVGData = function getDesignConceptSVGData(svgData) {
@@ -6738,31 +6749,12 @@ var PopUpCanvas = function PopUpCanvas() {
6738
6749
  //FOR REMOVING COLOR
6739
6750
  popupCanv.on('mouse:down', function (event) {
6740
6751
  popupCanv.discardActiveObject();
6741
- var pointer = popupCanv.getPointer(event.e);
6742
- console.log(event.target.fill);
6743
- var target = popupCanv.findTarget(event.e, true);
6744
- if (target.type !== "line") {
6745
- console.log('Object selected:', target.type);
6746
- target.bringToFront();
6747
- } else {
6748
- console.log('No object selected at', pointer);
6749
- }
6750
- // console.log('MOUSE-CLICK-->',mouseClick);
6751
6752
  // Iterate through objects on the canvas and check if any intersect with the mouse click
6752
6753
  var removedColors = [];
6753
6754
  use3dddPlus.getState().popUpCanvasUpdateModification(true);
6754
- var color;
6755
- popupCanv.forEachObject(function (obj) {
6756
- if (obj.type !== "line") {
6757
- //@ts-ignore
6758
- if (obj.containsPoint(pointer) && !color) {
6759
- removedColors.push(obj.fill);
6760
- popupCanv.remove(obj);
6761
- popupCanv.renderAll();
6762
- color = obj.fill;
6763
- }
6764
- }
6765
- });
6755
+ removedColors.push(event.target.fill);
6756
+ popupCanv.remove(event.target);
6757
+ popupCanv.renderAll();
6766
6758
  var defaultColorsCopy = defaultColorFillRef.current;
6767
6759
  removedColors.map(function (rc) {
6768
6760
  if (popupCanv.getObjects().filter(function (obj) {