@threedddplus/logoeditor 0.0.55 → 0.0.56

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.
@@ -2648,6 +2648,8 @@ var fabricSlice = function fabricSlice(set, get) {
2648
2648
  use3dddPlus.setState({
2649
2649
  selectedStepper: undefined
2650
2650
  });
2651
+ // Update layers
2652
+ use3dddPlus.getState().clearLayers();
2651
2653
  canvas.getObjects().forEach(function (element) {
2652
2654
  element.id = use3dddPlus.getState().guid();
2653
2655
  if (element.type !== "line") {
@@ -4115,7 +4117,7 @@ var ActionButtons = function ActionButtons() {
4115
4117
  visible: true
4116
4118
  }];
4117
4119
  return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
4118
- className: "w-100 flex px-3 items-center z-10 bg-[#ffffff] h-[40px]",
4120
+ className: "w-100 flex px-3 items-center z-10 h-[40px]",
4119
4121
  style: {
4120
4122
  justifyContent: 'flex-end'
4121
4123
  }
@@ -4374,8 +4376,8 @@ var initCanvas = function initCanvas() {
4374
4376
  obj.top = top1;
4375
4377
  obj.scaleX = scale1x;
4376
4378
  obj.scaleY = scale1y;
4377
- obj.width = width1;
4378
- obj.height = height1;
4379
+ // obj.width = width1;
4380
+ // obj.height = height1;
4379
4381
  } else {
4380
4382
  left1 = obj.left;
4381
4383
  top1 = obj.top;
@@ -7985,10 +7987,11 @@ var Rightmenu = function Rightmenu() {
7985
7987
  if (currentSelection === 'path') {
7986
7988
  textShapeChange(textSelected.shapeType, true);
7987
7989
  }
7988
- var textWidth = textSelected.width;
7989
- var canvasWidth = canvas.width - textSelected.left;
7990
- if (textWidth > canvasWidth) {
7991
- var newFontSize = canvasWidth / textWidth * textSelected.fontSize;
7990
+ // let textWidth = textSelected.width;
7991
+ var canvasWidth = canvas.width;
7992
+ var brNew = textSelected.getBoundingRect();
7993
+ if (brNew.width + brNew.left >= textSelected.canvas.width - 5) {
7994
+ var newFontSize = canvasWidth / (brNew.width + brNew.left) * textSelected.fontSize;
7992
7995
  textSelected.set('fontSize', newFontSize);
7993
7996
  }
7994
7997
  textSelected.set('text', use3dddPlus.getState().textInfo);