@threedddplus/logoeditor 0.0.189 → 0.0.191

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.
@@ -1858,10 +1858,13 @@ var toastMessages =
1858
1858
  return CustomToast('error', 'We cannot process this file because it is larger than 25MB. Please decrease the size and try again.', 11);
1859
1859
  },
1860
1860
  noChangesMade: function noChangesMade() {
1861
- return CustomToast('warning', 'No Changes Made To Save!!!', 12);
1861
+ return CustomToast('info', 'No Changes Made To Save!!!', 12);
1862
1862
  },
1863
1863
  fontsNotAvailable: function fontsNotAvailable() {
1864
- return CustomToast('warning', 'Fonts not availble in-order to view the proper text', 13);
1864
+ return CustomToast('info', 'Fonts not availble in-order to view the proper text', 13);
1865
+ },
1866
+ pleaseSelectTheImage: function pleaseSelectTheImage() {
1867
+ return CustomToast('info', 'Please select the IMAGE / TEXT to delete', 14);
1865
1868
  }
1866
1869
  };
1867
1870
 
@@ -2995,6 +2998,7 @@ var fabricSlice = function fabricSlice(set, get) {
2995
2998
  use3dddPlus.setState({
2996
2999
  mylogoAdded: false
2997
3000
  });
3001
+ canvas.discardActiveObject().renderAll();
2998
3002
  },
2999
3003
  uploadLogoConfig: function () {
3000
3004
  var _uploadLogoConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(jsonConfig, customerId) {
@@ -4794,7 +4798,7 @@ var ActionButtons = function ActionButtons() {
4794
4798
  });
4795
4799
  };
4796
4800
  var deleteHandler = function deleteHandler() {
4797
- if (canvas.getActiveObjects()) {
4801
+ if (canvas.getActiveObjects().length !== 0) {
4798
4802
  canvas.getActiveObjects().forEach(function (element) {
4799
4803
  if (element.icon) {
4800
4804
  canvas.remove(element);
@@ -4809,9 +4813,10 @@ var ActionButtons = function ActionButtons() {
4809
4813
  });
4810
4814
  canvas.discardActiveObject();
4811
4815
  // removeItem(activeSelection);
4816
+ } else {
4817
+ use3dddPlus.getState().toastMessages.pleaseSelectTheImage();
4812
4818
  }
4813
4819
  };
4814
-
4815
4820
  var removeItem = function removeItem(value) {
4816
4821
  // var index = use3dddPlus.getState().storeAllObject.indexOf(value);
4817
4822
  // @ts-ignore
@@ -5286,10 +5291,13 @@ var initCanvas = function initCanvas() {
5286
5291
  verticalLine: verticalLine
5287
5292
  });
5288
5293
  var deleteImg = document.createElement('img');
5294
+ deleteImg.crossOrigin = 'anonymous';
5289
5295
  deleteImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/delete.png';
5290
5296
  var rotateImg = document.createElement('img');
5297
+ rotateImg.crossOrigin = 'anonymous';
5291
5298
  rotateImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/rotate.png';
5292
5299
  var settingImg = document.createElement('img');
5300
+ settingImg.crossOrigin = 'anonymous';
5293
5301
  settingImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/settings.png';
5294
5302
  fabric.fabric.Object.prototype.objectCaching = false;
5295
5303
  fabric.fabric.Object.prototype.transparentCorners = false;
@@ -5436,8 +5444,8 @@ var initCanvas = function initCanvas() {
5436
5444
  }
5437
5445
  var colors = [];
5438
5446
  use3dddPlus.getState().fabricCanvas.traverse(function (node) {
5439
- if (node.type === "text" || node.type === "path") {
5440
- if (node.fill && (node.fill === 'rgb(0,0,0)' || node.fill === "#000" || node.fill === "#000000")) {
5447
+ if (node.type === 'text' || node.type === 'path') {
5448
+ if (node.fill && (node.fill === 'rgb(0,0,0)' || node.fill === '#000' || node.fill === '#000000')) {
5441
5449
  node.set({
5442
5450
  fill: '#040404'
5443
5451
  });