@threedddplus/logoeditor 0.0.188 → 0.0.190

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.
@@ -5286,10 +5286,13 @@ var initCanvas = function initCanvas() {
5286
5286
  verticalLine: verticalLine
5287
5287
  });
5288
5288
  var deleteImg = document.createElement('img');
5289
+ deleteImg.crossOrigin = 'anonymous';
5289
5290
  deleteImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/delete.png';
5290
5291
  var rotateImg = document.createElement('img');
5292
+ rotateImg.crossOrigin = 'anonymous';
5291
5293
  rotateImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/rotate.png';
5292
5294
  var settingImg = document.createElement('img');
5295
+ settingImg.crossOrigin = 'anonymous';
5293
5296
  settingImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/settings.png';
5294
5297
  fabric.fabric.Object.prototype.objectCaching = false;
5295
5298
  fabric.fabric.Object.prototype.transparentCorners = false;
@@ -5436,8 +5439,8 @@ var initCanvas = function initCanvas() {
5436
5439
  }
5437
5440
  var colors = [];
5438
5441
  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")) {
5442
+ if (node.type === 'text' || node.type === 'path') {
5443
+ if (node.fill && (node.fill === 'rgb(0,0,0)' || node.fill === '#000' || node.fill === '#000000')) {
5441
5444
  node.set({
5442
5445
  fill: '#040404'
5443
5446
  });
@@ -14619,8 +14622,8 @@ var SaveDesign = function SaveDesign(_ref) {
14619
14622
  canvas.requestRenderAll();
14620
14623
  group.clone(function (clonedGroup) {
14621
14624
  var boundingRect = clonedGroup.getBoundingRect();
14622
- var paddedWidth = boundingRect.width + 2 * padding;
14623
- var paddedHeight = boundingRect.height + 2 * padding;
14625
+ var paddedWidth = boundingRect.width + 4 * padding;
14626
+ var paddedHeight = boundingRect.height + 6 * padding;
14624
14627
  tempCanvas.setWidth(paddedWidth);
14625
14628
  tempCanvas.setHeight(paddedHeight);
14626
14629
  clonedGroup.left = padding + boundingRect.left;
@@ -14631,6 +14634,7 @@ var SaveDesign = function SaveDesign(_ref) {
14631
14634
  clonedGroup.setCoords();
14632
14635
  tempCanvas.requestRenderAll();
14633
14636
  var dataURL = tempCanvas.toDataURL();
14637
+ console.log("Image--->", dataURL);
14634
14638
  tempCanvas.clear();
14635
14639
  tempCanvas.dispose();
14636
14640
  clonedGroup = null;
@@ -14648,17 +14652,18 @@ var SaveDesign = function SaveDesign(_ref) {
14648
14652
  return selectAllCanvasObjects();
14649
14653
  case 3:
14650
14654
  dataURL = _context.sent;
14651
- _context.next = 9;
14655
+ console.log();
14656
+ _context.next = 10;
14652
14657
  break;
14653
- case 6:
14654
- _context.prev = 6;
14658
+ case 7:
14659
+ _context.prev = 7;
14655
14660
  _context.t0 = _context["catch"](0);
14656
14661
  console.error('Error capturing canvas objects:', _context.t0);
14657
- case 9:
14662
+ case 10:
14658
14663
  case "end":
14659
14664
  return _context.stop();
14660
14665
  }
14661
- }, _callee, null, [[0, 6]]);
14666
+ }, _callee, null, [[0, 7]]);
14662
14667
  }))();
14663
14668
  canvasData = use3dddPlus.getState().applyColorFill(); // dataURL = canvas.toDataURL();
14664
14669
  // looping through the text shape objects & taking out text data to inject in the canvas json data & save