@threedddplus/logoeditor 0.0.143 → 0.0.144
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.
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/logoeditor.cjs.development.js +47 -28
- package/dist/logoeditor.cjs.development.js.map +1 -1
- package/dist/logoeditor.cjs.production.min.js +1 -1
- package/dist/logoeditor.cjs.production.min.js.map +1 -1
- package/dist/logoeditor.esm.js +47 -28
- package/dist/logoeditor.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -2796,22 +2796,41 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
2796
2796
|
get().fabricCanvas.renderAll();
|
2797
2797
|
},
|
2798
2798
|
applyColorFill: function applyColorFill() {
|
2799
|
-
|
2800
|
-
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
}
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2799
|
+
/* const canvasGetobject = get().fabricCanvas.getObjects();
|
2800
|
+
canvasGetobject.forEach((element: any) => {
|
2801
|
+
element?._objects?.forEach((data:any)=>{
|
2802
|
+
if( data.group)return;
|
2803
|
+
else if(data.fill === undefined){
|
2804
|
+
get().popupCanv.remove(data);
|
2805
|
+
// get().fabricCanvas.group.remove(data);
|
2806
|
+
// data.canvas.remove(data);
|
2807
|
+
}
|
2808
|
+
console.log(data);
|
2809
|
+
})
|
2810
|
+
}) */
|
2811
|
+
var canvasData = get().fabricCanvas.toJSON(['id', 'colorFill', 'shapeType', 'shapeSize', 'text', 'textAlign', 'stroke', 'strokeWidth', 'fontFamily', 'icon']);
|
2812
|
+
// const canvasGetobject = get().fabricCanvas.getObjects();
|
2813
|
+
// canvasData.objects.forEach((element: any, index: any) => {
|
2814
|
+
// if (
|
2815
|
+
// canvasGetobject &&
|
2816
|
+
//canvasGetobject.length > 0 &&
|
2817
|
+
// canvasGetobject[index].shapeType
|
2818
|
+
//) {
|
2819
|
+
// element.shapeType = canvasGetobject[index].shapeType;
|
2820
|
+
// element.shapeSize = canvasGetobject[index].shapeSize;
|
2821
|
+
// element.text = canvasGetobject[index].text;
|
2822
|
+
// element.textAlign = canvasGetobject[index].textAlign;
|
2823
|
+
// element.stroke = canvasGetobject[index].stroke;
|
2824
|
+
// element.strokeWidth = canvasGetobject[index].strokeWidth;
|
2825
|
+
// element.fontFamily = canvasGetobject[index].fontFamily;
|
2826
|
+
// }
|
2827
|
+
//else if(element.colorFill === 'rgb(0,0,0)'){
|
2828
|
+
//canvasGetobject.remove(element);
|
2829
|
+
//}
|
2830
|
+
// element.colorFill = canvasGetobject[index].colorFill;
|
2831
|
+
// element.icon = canvasGetobject[index].icon;
|
2832
|
+
// element.id = canvasGetobject[index].id;
|
2833
|
+
// });
|
2815
2834
|
return canvasData;
|
2816
2835
|
},
|
2817
2836
|
setDefaultColorFill: function setDefaultColorFill(dcf) {
|
@@ -4755,7 +4774,6 @@ var SEARCHBAR_BORDER_COLOR = 'border-[#bebebe]';
|
|
4755
4774
|
var CANVAS_MENU_TEXT = 'text-[#353535]';
|
4756
4775
|
var TAG_BG_COLOR = 'bg-[#FCE8EB]';
|
4757
4776
|
var TAG_TEXT_COLOR = 'text-[#e11a38]';
|
4758
|
-
var SAVERACK_TEXT_COLOR = 'text-[#707070]';
|
4759
4777
|
var SAVEBUTTON_BG_COLOR = 'bg-[#E11A38]';
|
4760
4778
|
var EDIT_DESIGN_INFO_TEXT_COLOR_1 = 'text-[#E11A38]';
|
4761
4779
|
var EDIT_DESIGN_INFO_TEXT_COLOR_3 = 'text-[#353535]';
|
@@ -7663,22 +7681,13 @@ var Modal = function Modal(_ref) {
|
|
7663
7681
|
var backdropStyle = _ref.backdropStyle,
|
7664
7682
|
children = _ref.children,
|
7665
7683
|
contentStyle = _ref.contentStyle,
|
7666
|
-
crossOnClick = _ref.crossOnClick,
|
7667
7684
|
modalStyle = _ref.modalStyle;
|
7668
7685
|
return React.createElement("div", null, React.createElement("div", {
|
7669
7686
|
className: backdropStyle + " absolute top-0 left-0 h-screen w-full " + BACKDROP_BLUR + " " + BACKDROP_BLUR_BG_COLOR
|
7670
7687
|
}), React.createElement("dialog", {
|
7671
7688
|
open: true,
|
7672
7689
|
className: contentStyle + " absolute shadow-[0 2px 8px rgba(0, 0, 0, 0.26)] ml-[auto] md:mr-[0%] mr-[auto]"
|
7673
|
-
}, React.createElement(
|
7674
|
-
label: '',
|
7675
|
-
icon: React.createElement(RxCross2, {
|
7676
|
-
strokeWidth: 1,
|
7677
|
-
onClick: crossOnClick
|
7678
|
-
}),
|
7679
|
-
className: "z-10 pointer-events-auto cursor-pointer " + SAVERACK_TEXT_COLOR + " font-bold !absolute right-[0.6875rem] top-[0.6875rem] px-[0.75rem] py-[1.25rem] hover:bg-[#E11A38] hover:text-[#ffffff] hover:rounded-none",
|
7680
|
-
size: "1.2rem"
|
7681
|
-
}), React.createElement("div", {
|
7690
|
+
}, React.createElement("div", {
|
7682
7691
|
className: "flex flex-col justify-center gap-[1.75rem] " + modalStyle
|
7683
7692
|
}, children)));
|
7684
7693
|
};
|
@@ -14498,6 +14507,16 @@ var SaveDesign = function SaveDesign(_ref) {
|
|
14498
14507
|
canvasGetobject.forEach(function (obj) {
|
14499
14508
|
if (obj.type === 'line') {
|
14500
14509
|
canvas.remove(obj);
|
14510
|
+
} else {
|
14511
|
+
var _obj$_objects;
|
14512
|
+
obj == null ? void 0 : (_obj$_objects = obj._objects) == null ? void 0 : _obj$_objects.forEach(function (ele) {
|
14513
|
+
if (ele.fill === undefined) {
|
14514
|
+
ele.set({
|
14515
|
+
scaleX: 0,
|
14516
|
+
scaleY: 0
|
14517
|
+
});
|
14518
|
+
}
|
14519
|
+
});
|
14501
14520
|
}
|
14502
14521
|
});
|
14503
14522
|
// saving all path text data (text with shapes applied)
|
@@ -14538,7 +14557,7 @@ var SaveDesign = function SaveDesign(_ref) {
|
|
14538
14557
|
}
|
14539
14558
|
}
|
14540
14559
|
}
|
14541
|
-
dataCh = JSON.stringify(canvasData);
|
14560
|
+
dataCh = JSON.stringify(canvasData); // console.log('SAVE-->',dataCh);
|
14542
14561
|
_context.next = 16;
|
14543
14562
|
return uploadLogoConfig(dataCh, use3dddPlus.getState().customerId);
|
14544
14563
|
case 16:
|