@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.
@@ -5278,10 +5278,13 @@ var initCanvas = function initCanvas() {
5278
5278
  verticalLine: verticalLine
5279
5279
  });
5280
5280
  var deleteImg = document.createElement('img');
5281
+ deleteImg.crossOrigin = 'anonymous';
5281
5282
  deleteImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/delete.png';
5282
5283
  var rotateImg = document.createElement('img');
5284
+ rotateImg.crossOrigin = 'anonymous';
5283
5285
  rotateImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/rotate.png';
5284
5286
  var settingImg = document.createElement('img');
5287
+ settingImg.crossOrigin = 'anonymous';
5285
5288
  settingImg.src = 'https://storage.googleapis.com/3ddplusgcp/logoEditor/assets/icons/settings.png';
5286
5289
  fabric.Object.prototype.objectCaching = false;
5287
5290
  fabric.Object.prototype.transparentCorners = false;
@@ -5428,8 +5431,8 @@ var initCanvas = function initCanvas() {
5428
5431
  }
5429
5432
  var colors = [];
5430
5433
  use3dddPlus.getState().fabricCanvas.traverse(function (node) {
5431
- if (node.type === "text" || node.type === "path") {
5432
- if (node.fill && (node.fill === 'rgb(0,0,0)' || node.fill === "#000" || node.fill === "#000000")) {
5434
+ if (node.type === 'text' || node.type === 'path') {
5435
+ if (node.fill && (node.fill === 'rgb(0,0,0)' || node.fill === '#000' || node.fill === '#000000')) {
5433
5436
  node.set({
5434
5437
  fill: '#040404'
5435
5438
  });
@@ -14611,8 +14614,8 @@ var SaveDesign = function SaveDesign(_ref) {
14611
14614
  canvas.requestRenderAll();
14612
14615
  group.clone(function (clonedGroup) {
14613
14616
  var boundingRect = clonedGroup.getBoundingRect();
14614
- var paddedWidth = boundingRect.width + 2 * padding;
14615
- var paddedHeight = boundingRect.height + 2 * padding;
14617
+ var paddedWidth = boundingRect.width + 4 * padding;
14618
+ var paddedHeight = boundingRect.height + 6 * padding;
14616
14619
  tempCanvas.setWidth(paddedWidth);
14617
14620
  tempCanvas.setHeight(paddedHeight);
14618
14621
  clonedGroup.left = padding + boundingRect.left;
@@ -14623,6 +14626,7 @@ var SaveDesign = function SaveDesign(_ref) {
14623
14626
  clonedGroup.setCoords();
14624
14627
  tempCanvas.requestRenderAll();
14625
14628
  var dataURL = tempCanvas.toDataURL();
14629
+ console.log("Image--->", dataURL);
14626
14630
  tempCanvas.clear();
14627
14631
  tempCanvas.dispose();
14628
14632
  clonedGroup = null;
@@ -14640,17 +14644,18 @@ var SaveDesign = function SaveDesign(_ref) {
14640
14644
  return selectAllCanvasObjects();
14641
14645
  case 3:
14642
14646
  dataURL = _context.sent;
14643
- _context.next = 9;
14647
+ console.log();
14648
+ _context.next = 10;
14644
14649
  break;
14645
- case 6:
14646
- _context.prev = 6;
14650
+ case 7:
14651
+ _context.prev = 7;
14647
14652
  _context.t0 = _context["catch"](0);
14648
14653
  console.error('Error capturing canvas objects:', _context.t0);
14649
- case 9:
14654
+ case 10:
14650
14655
  case "end":
14651
14656
  return _context.stop();
14652
14657
  }
14653
- }, _callee, null, [[0, 6]]);
14658
+ }, _callee, null, [[0, 7]]);
14654
14659
  }))();
14655
14660
  canvasData = use3dddPlus.getState().applyColorFill(); // dataURL = canvas.toDataURL();
14656
14661
  // looping through the text shape objects & taking out text data to inject in the canvas json data & save