@threedddplus/logoeditor 0.0.50 → 0.0.51

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.
@@ -2293,6 +2293,7 @@ var fabricSlice = function fabricSlice(set, get) {
2293
2293
  nameCounter: 0,
2294
2294
  duplicateObject: function duplicateObject() {
2295
2295
  if (get().fabricCanvas.getActiveObject()) {
2296
+ var activeObj = get().fabricCanvas.getActiveObject();
2296
2297
  var clipboard;
2297
2298
  get().fabricCanvas.getActiveObject().clone(function (cloned) {
2298
2299
  clipboard = cloned;
@@ -2304,11 +2305,13 @@ var fabricSlice = function fabricSlice(set, get) {
2304
2305
  });
2305
2306
  if (clonedObj.type === 'activeSelection') {
2306
2307
  clonedObj.canvas = get().fabricCanvas;
2307
- clonedObj.forEachObject(function (obj) {
2308
+ clonedObj.forEachObject(function (obj, index) {
2309
+ obj.colorFill = activeObj._objects[index].colorFill;
2308
2310
  get().fabricCanvas.add(obj);
2309
2311
  });
2310
2312
  clonedObj.setCoords();
2311
2313
  } else {
2314
+ clonedObj.colorFill = activeObj.colorFill;
2312
2315
  get().fabricCanvas.add(clonedObj);
2313
2316
  }
2314
2317
  clipboard.top += 20;
@@ -2327,10 +2330,6 @@ var fabricSlice = function fabricSlice(set, get) {
2327
2330
  data.icon = data.toDataURL('image/png');
2328
2331
  get().forStoringAllObject(data);
2329
2332
  });
2330
- } else if (clonedObj._objects && clipboard._objects.length > 0) {
2331
- use3dddPlus.getState().forIconCapture();
2332
- clonedObj._objects[0].icon = use3dddPlus.getState().iconImage;
2333
- get().forStoringAllObject(clonedObj._objects[0]);
2334
2333
  } else {
2335
2334
  use3dddPlus.getState().forIconCapture();
2336
2335
  clonedObj.icon = use3dddPlus.getState().iconImage;
@@ -3531,7 +3530,7 @@ var converterSlice = function converterSlice(set, get) {
3531
3530
  // .getState()
3532
3531
  // .popupCanv.getActiveObject()._objects;
3533
3532
  if (use3dddPlus.getState().loadedObject) {
3534
- var objImage = use3dddPlus.getState().loadedObject;
3533
+ var objImage = use3dddPlus.getState().popupCanv.getObjects();
3535
3534
  objImage.forEach(function (ele) {
3536
3535
  var _C = ele.fill === 'transparent' ? ele.fill : ele.fill.includes('#') ? ele.fill : get().RGBToHex(ele.fill);
3537
3536
  if (_C === previousColor) {
@@ -5113,7 +5112,7 @@ var ToolTip = function ToolTip(_ref) {
5113
5112
  placement: 'top'
5114
5113
  });
5115
5114
  return React.createElement(React.Fragment, null, React.createElement(TooltipReference, Object.assign({}, tooltip, {
5116
- className: className + " flex relative items-center justify-center align-middle w-auto text-sm font-semibold h-5 first:rounded-l last:rounded-r focus:outline-none",
5115
+ className: className + " flex relative items-center justify-center align-middle w-auto text-sm font-semibold first:rounded-l last:rounded-r focus:outline-none",
5117
5116
  "aria-label": label
5118
5117
  }), children),
5119
5118
  //@ts-ignore
@@ -5230,7 +5229,19 @@ var ColorImpl = function ColorImpl(props) {
5230
5229
  setColor(color);
5231
5230
  props.handleChange(props.property, color);
5232
5231
  };
5233
- return React.createElement(React.Fragment, null, React.createElement("div", {
5232
+ var getLable = function getLable(colorCode) {
5233
+ var color = defaultColorNames.find(function (c) {
5234
+ return colorCode === c.color;
5235
+ });
5236
+ if (color && color.name) {
5237
+ return color.name;
5238
+ } else {
5239
+ return colorCode;
5240
+ }
5241
+ };
5242
+ return React.createElement(ToolTip, {
5243
+ label: getLable(props.color)
5244
+ }, React.createElement("div", {
5234
5245
  className: props.mClass
5235
5246
  }, React.createElement("div", {
5236
5247
  className: "border border-gray-600 w-[30px] h-[30px] group",
@@ -5781,13 +5792,14 @@ var PopUpCanvas = function PopUpCanvas() {
5781
5792
  return React.createElement("div", {
5782
5793
  className: "flex flex-row items-center",
5783
5794
  key: index
5795
+ }, React.createElement(ToolTip, {
5796
+ label: item["default"]
5784
5797
  }, React.createElement("div", {
5785
5798
  className: "w-[30px] h-[30px] m-2 border-[1px] border-[#000000]",
5786
5799
  style: {
5787
5800
  background: item["default"]
5788
- },
5789
- title: item["default"]
5790
- }), React.createElement("div", {
5801
+ }
5802
+ })), React.createElement("div", {
5791
5803
  className: "mx-[20px] text-[#c2c2c2]"
5792
5804
  }, React.createElement(CgArrowRight, null)), React.createElement("div", {
5793
5805
  className: "flex flex-row border-[1px] border-[#D6D6D6]"