@threedddplus/logoeditor 0.0.71 → 0.0.73
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/logoeditor.cjs.development.js +232 -105
- 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 +232 -105
- package/dist/logoeditor.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -4689,9 +4689,15 @@ var initCanvas = function initCanvas() {
|
|
4689
4689
|
var onObjectMoving = function onObjectMoving(e) {
|
4690
4690
|
use3dddPlus.getState().updateModifaction(false);
|
4691
4691
|
var obj = e.target;
|
4692
|
+
if (isNaN(obj.left)) {
|
4693
|
+
obj.left = obj.left - 1;
|
4694
|
+
obj.setCoords();
|
4695
|
+
}
|
4696
|
+
if (isNaN(obj.top)) {
|
4697
|
+
obj.top = obj.top - 1;
|
4698
|
+
obj.setCoords();
|
4699
|
+
}
|
4692
4700
|
console.log(e);
|
4693
|
-
if (isNaN(e.pointer.x)) return;
|
4694
|
-
if (isNaN(e.pointer.y)) return;
|
4695
4701
|
// if (
|
4696
4702
|
// obj.getBoundingRect().width > obj.canvas.height ||
|
4697
4703
|
// obj.getBoundingRect().height > obj.canvas.width
|
@@ -4981,6 +4987,7 @@ var initCanvas = function initCanvas() {
|
|
4981
4987
|
canv.on('selection:updated', onObjectUpdated);
|
4982
4988
|
canv.on('object:moving', onObjectMoving);
|
4983
4989
|
canv.on('object:modified', function (e) {
|
4990
|
+
e.target.lockRotation = false;
|
4984
4991
|
use3dddPlus.getState().updateModifaction(true);
|
4985
4992
|
if (isObjectInCenter(e.target)) {
|
4986
4993
|
use3dddPlus.getState().verticalLine.set({
|
@@ -5038,9 +5045,13 @@ var initCanvas = function initCanvas() {
|
|
5038
5045
|
obj.setCoords();
|
5039
5046
|
}
|
5040
5047
|
if (obj.getBoundingRect().top + obj.getBoundingRect().height > obj.canvas.height || obj.getBoundingRect().left + obj.getBoundingRect().width > obj.canvas.width) {
|
5041
|
-
|
5042
|
-
|
5043
|
-
|
5048
|
+
if (obj.getBoundingRect().top < 0 || obj.getBoundingRect().left < 0) {
|
5049
|
+
obj.lockRotation = true;
|
5050
|
+
} else {
|
5051
|
+
obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top);
|
5052
|
+
obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left);
|
5053
|
+
obj.setCoords();
|
5054
|
+
}
|
5044
5055
|
}
|
5045
5056
|
});
|
5046
5057
|
return canv;
|
@@ -5893,7 +5904,7 @@ var ColorPalette = function ColorPalette(_ref) {
|
|
5893
5904
|
};
|
5894
5905
|
return React.createElement(React.Fragment, null, React.createElement("div", {
|
5895
5906
|
id: "colorPalette",
|
5896
|
-
className: "right-[10.6rem] z-10 max-h-[16.4375rem] border border-[#FCE8EB] before:bg-[#ffffff] shadow-[0px_3px_6px_rgba(0,0,0,0.16)] py-[1.8125rem] px-[1.4063rem] bg-[#fff] mt-[1.875rem] mr-[1rem] absolute h-[300px]",
|
5907
|
+
className: "colorPalette right-[10.6rem] z-10 max-h-[16.4375rem] border border-[#FCE8EB] before:bg-[#ffffff] shadow-[0px_3px_6px_rgba(0,0,0,0.16)] py-[1.8125rem] px-[1.4063rem] bg-[#fff] mt-[1.875rem] mr-[1rem] absolute h-[300px]",
|
5897
5908
|
style: style
|
5898
5909
|
}, (colorList == null ? void 0 : colorList.length) > 0 && React.createElement(React.Fragment, null, React.createElement("p", {
|
5899
5910
|
className: TEXT_SIZE_9 + " leading-[1.125rem] font-bold pb-[1.125rem] text-left"
|
@@ -5959,24 +5970,6 @@ var ColorBox = function ColorBox(_ref2) {
|
|
5959
5970
|
};
|
5960
5971
|
|
5961
5972
|
var ColorImpl = function ColorImpl(props) {
|
5962
|
-
var _useState = useState(props.displayPallet ? true : false),
|
5963
|
-
displayPallet = _useState[0],
|
5964
|
-
setdisplayPallet = _useState[1];
|
5965
|
-
var _useState2 = useState(props.color),
|
5966
|
-
setColor = _useState2[1];
|
5967
|
-
var _useState3 = useState(props.position),
|
5968
|
-
position = _useState3[0],
|
5969
|
-
setPosition = _useState3[1];
|
5970
|
-
useEffect(function () {
|
5971
|
-
if (!displayPallet && props.onClose) {
|
5972
|
-
props.onClose();
|
5973
|
-
}
|
5974
|
-
}, [displayPallet]);
|
5975
|
-
var handleColorClick = function handleColorClick(color) {
|
5976
|
-
// console.log(color);
|
5977
|
-
setColor(color);
|
5978
|
-
props.handleChange(props.property, color);
|
5979
|
-
};
|
5980
5973
|
var getLable = function getLable(colorCode) {
|
5981
5974
|
var color = defaultColorNames.find(function (c) {
|
5982
5975
|
return colorCode === c.color;
|
@@ -5999,16 +5992,16 @@ var ColorImpl = function ColorImpl(props) {
|
|
5999
5992
|
onClick: function onClick(event) {
|
6000
5993
|
event.stopPropagation();
|
6001
5994
|
event.preventDefault();
|
6002
|
-
|
6003
|
-
|
5995
|
+
props.setDisplayPallet({
|
5996
|
+
visible: true,
|
5997
|
+
property: props.property,
|
5998
|
+
color: '',
|
5999
|
+
callback: props.callback
|
6004
6000
|
});
|
6005
|
-
setPosition({
|
6001
|
+
props.setPosition({
|
6006
6002
|
x: event.clientX,
|
6007
6003
|
y: event.clientY
|
6008
6004
|
});
|
6009
|
-
},
|
6010
|
-
onBlur: function onBlur() {
|
6011
|
-
return setdisplayPallet(false);
|
6012
6005
|
}
|
6013
6006
|
}, props.color === 'transparent' && React.createElement("div", {
|
6014
6007
|
style: {
|
@@ -6019,31 +6012,7 @@ var ColorImpl = function ColorImpl(props) {
|
|
6019
6012
|
marginLeft: '13px',
|
6020
6013
|
marginTop: '-6px'
|
6021
6014
|
}
|
6022
|
-
}, "\xA0")
|
6023
|
-
mainClass: "left-0 " + props.mClass,
|
6024
|
-
handleColorChange: handleColorClick,
|
6025
|
-
style: position ? {
|
6026
|
-
position: 'fixed',
|
6027
|
-
left: position.x - 450,
|
6028
|
-
top: position.y - 5,
|
6029
|
-
width: '450px'
|
6030
|
-
} : {}
|
6031
|
-
})
|
6032
|
-
// <div
|
6033
|
-
// className="absolute"
|
6034
|
-
// style={{ zIndex: '100' }}
|
6035
|
-
// tabIndex={0}
|
6036
|
-
// onBlur={() => setdisplayPallet(false)}
|
6037
|
-
// >
|
6038
|
-
// <ChromePicker
|
6039
|
-
// color={color.hex}
|
6040
|
-
// onChangeComplete={onChangeComplete}
|
6041
|
-
// onChange={onChangeComplete}
|
6042
|
-
// disableAlpha={true}
|
6043
|
-
// />
|
6044
|
-
// <hr />
|
6045
|
-
// </div>
|
6046
|
-
)));
|
6015
|
+
}, "\xA0"))));
|
6047
6016
|
};
|
6048
6017
|
|
6049
6018
|
var Initpopup = function Initpopup() {
|
@@ -6118,6 +6087,26 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
6118
6087
|
isNextClicked = _useState4[0],
|
6119
6088
|
setIsNextClicked = _useState4[1];
|
6120
6089
|
var defaultColorFillRef = useRef([]);
|
6090
|
+
var _useState5 = useState({
|
6091
|
+
visible: false,
|
6092
|
+
property: '',
|
6093
|
+
color: '',
|
6094
|
+
callback: null
|
6095
|
+
}),
|
6096
|
+
displayPallet = _useState5[0],
|
6097
|
+
setDisplayPallet = _useState5[1];
|
6098
|
+
var _useState6 = useState(null),
|
6099
|
+
position = _useState6[0],
|
6100
|
+
setPosition = _useState6[1];
|
6101
|
+
useEffect(function () {
|
6102
|
+
if (!displayPallet || !displayPallet.visible) {
|
6103
|
+
setDefaultColorFill(defaultColorFill.map(function (cf) {
|
6104
|
+
return _extends({}, cf, {
|
6105
|
+
hasPallet: false
|
6106
|
+
});
|
6107
|
+
}));
|
6108
|
+
}
|
6109
|
+
}, [displayPallet]);
|
6121
6110
|
useEffect(function () {
|
6122
6111
|
defaultColorFillRef.current = defaultColorFill;
|
6123
6112
|
}, [defaultColorFill]);
|
@@ -6216,10 +6205,12 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
6216
6205
|
}
|
6217
6206
|
};
|
6218
6207
|
var removeColorPalatte = function removeColorPalatte() {
|
6219
|
-
|
6220
|
-
|
6221
|
-
|
6222
|
-
|
6208
|
+
setDisplayPallet({
|
6209
|
+
visible: false,
|
6210
|
+
property: '',
|
6211
|
+
color: '',
|
6212
|
+
callback: null
|
6213
|
+
});
|
6223
6214
|
};
|
6224
6215
|
useEffect(function () {
|
6225
6216
|
fabric.Object.prototype.hasControls = false;
|
@@ -6433,16 +6424,26 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
6433
6424
|
x: event.clientX,
|
6434
6425
|
y: event.clientY
|
6435
6426
|
}
|
6436
|
-
}) : cf
|
6437
|
-
}));
|
6438
|
-
};
|
6439
|
-
var onClosePalette = function onClosePalette() {
|
6440
|
-
setDefaultColorFill(defaultColorFill.map(function (c) {
|
6441
|
-
return _extends({}, c, {
|
6427
|
+
}) : _extends({}, cf, {
|
6442
6428
|
hasPallet: false
|
6443
6429
|
});
|
6444
6430
|
}));
|
6431
|
+
setDisplayPallet({
|
6432
|
+
visible: true,
|
6433
|
+
property: item.property,
|
6434
|
+
color: item.updated,
|
6435
|
+
callback: onColorUpdate
|
6436
|
+
});
|
6437
|
+
setPosition({
|
6438
|
+
x: event.clientX,
|
6439
|
+
y: event.clientY
|
6440
|
+
});
|
6445
6441
|
};
|
6442
|
+
// const onClosePalette = () => {
|
6443
|
+
// setDefaultColorFill(
|
6444
|
+
// defaultColorFill.map((c: any) => ({ ...c, hasPallet: false }))
|
6445
|
+
// );
|
6446
|
+
// };
|
6446
6447
|
var onPopUpCanvasUndo = function onPopUpCanvasUndo() {
|
6447
6448
|
var colors = popUpCanvasUndo();
|
6448
6449
|
if (colors !== null) {
|
@@ -6628,9 +6629,10 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
6628
6629
|
handleChange: onColorUpdate,
|
6629
6630
|
property: item.property,
|
6630
6631
|
color: item.updated,
|
6631
|
-
onClose
|
6632
|
-
|
6633
|
-
|
6632
|
+
// onClose={onClosePalette}
|
6633
|
+
setDisplayPallet: setDisplayPallet,
|
6634
|
+
setPosition: setPosition,
|
6635
|
+
callback: onColorUpdate
|
6634
6636
|
}) : React.createElement(IconButton, {
|
6635
6637
|
label: "Select Color",
|
6636
6638
|
icon: React.createElement(GiDrop, null),
|
@@ -6646,7 +6648,10 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
6646
6648
|
handleChange: onColorUpdate,
|
6647
6649
|
property: item.property,
|
6648
6650
|
color: item.updated,
|
6649
|
-
onClose
|
6651
|
+
// onClose={onClosePalette}
|
6652
|
+
setDisplayPallet: setDisplayPallet,
|
6653
|
+
setPosition: setPosition,
|
6654
|
+
callback: onColorUpdate
|
6650
6655
|
})), React.createElement("span", {
|
6651
6656
|
className: "py-[5px] pl-[10px] pr-[6px] font-medium text-[13px] bg-[#F1F1F1]"
|
6652
6657
|
}, "Select Color")), React.createElement("span", {
|
@@ -6749,7 +6754,26 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
6749
6754
|
style: {
|
6750
6755
|
marginTop: '10px'
|
6751
6756
|
}
|
6752
|
-
}, "Cancel")))))))))
|
6757
|
+
}, "Cancel"))))))))), displayPallet && displayPallet.visible && React.createElement(ColorPalette, {
|
6758
|
+
mainClass: "left-0",
|
6759
|
+
handleColorChange: function handleColorChange(color) {
|
6760
|
+
displayPallet.callback(displayPallet.property, color);
|
6761
|
+
setDisplayPallet({
|
6762
|
+
visible: false,
|
6763
|
+
property: '',
|
6764
|
+
color: '',
|
6765
|
+
callback: null
|
6766
|
+
});
|
6767
|
+
},
|
6768
|
+
style: position ? {
|
6769
|
+
position: 'fixed',
|
6770
|
+
left: position.x - 450,
|
6771
|
+
top: position.y - 5,
|
6772
|
+
width: '450px'
|
6773
|
+
} : {
|
6774
|
+
display: 'none'
|
6775
|
+
}
|
6776
|
+
}));
|
6753
6777
|
};
|
6754
6778
|
|
6755
6779
|
var UploadLogo = function UploadLogo() {
|
@@ -7999,6 +8023,17 @@ var Rightmenu = function Rightmenu() {
|
|
7999
8023
|
var _useState6 = useState(false),
|
8000
8024
|
isNextClicked = _useState6[0],
|
8001
8025
|
setIsNextClicked = _useState6[1];
|
8026
|
+
var _useState7 = useState({
|
8027
|
+
visible: false,
|
8028
|
+
property: '',
|
8029
|
+
color: '',
|
8030
|
+
callback: null
|
8031
|
+
}),
|
8032
|
+
displayPallet = _useState7[0],
|
8033
|
+
setDisplayPallet = _useState7[1];
|
8034
|
+
var _useState8 = useState(null),
|
8035
|
+
position = _useState8[0],
|
8036
|
+
setPosition = _useState8[1];
|
8002
8037
|
var tabs = [{
|
8003
8038
|
id: 1,
|
8004
8039
|
label: 'Properties'
|
@@ -8555,6 +8590,13 @@ var Rightmenu = function Rightmenu() {
|
|
8555
8590
|
// textSelected.set('text', use3dddPlus.getState().textInfo);
|
8556
8591
|
use3dddPlus.getState().forIconCapture();
|
8557
8592
|
textSelected.icon = use3dddPlus.getState().iconImage;
|
8593
|
+
var dublicateText = textSelected;
|
8594
|
+
var brNewD = textSelected.getBoundingRect();
|
8595
|
+
if (brNewD.width + brNewD.left + 45 >= dublicateText.canvas.width || brNewD.height + brNewD.top + 10 >= dublicateText.canvas.height || brNewD.left < 0 || brNewD.top < 0) {
|
8596
|
+
var newFontSize = canvasWidth / (brNew.width + brNew.left) * textSelected.fontSize;
|
8597
|
+
textSelected.set('fontSize', textSelected.fontSize - 3);
|
8598
|
+
}
|
8599
|
+
textSelected.setCoords();
|
8558
8600
|
canvas.renderAll();
|
8559
8601
|
use3dddPlus.getState().updateModifaction(true);
|
8560
8602
|
};
|
@@ -8687,16 +8729,33 @@ var Rightmenu = function Rightmenu() {
|
|
8687
8729
|
};
|
8688
8730
|
var textSpacingHandler = function textSpacingHandler(e) {
|
8689
8731
|
// setSpacinglineVal(e.target.valueAsNumber);
|
8690
|
-
|
8691
|
-
if (
|
8692
|
-
|
8693
|
-
|
8694
|
-
|
8695
|
-
|
8696
|
-
|
8697
|
-
|
8698
|
-
|
8699
|
-
|
8732
|
+
var brNew = textSelected.getBoundingRect();
|
8733
|
+
if (brNew.width + brNew.left >= textSelected.canvas.width || brNew.height + brNew.top >= textSelected.canvas.height || brNew.left < 0 || brNew.top < 0) {
|
8734
|
+
if (textSelected.charSpacing > e.target.valueAsNumber) {
|
8735
|
+
textSelected.charSpacing = e.target.valueAsNumber;
|
8736
|
+
if (currentSelection === 'path') {
|
8737
|
+
textShapeChange(textSelected.shapeType, true);
|
8738
|
+
}
|
8739
|
+
use3dddPlus.getState().updateModifaction(true);
|
8740
|
+
use3dddPlus.getState().forIconCapture();
|
8741
|
+
textSelected.icon = use3dddPlus.getState().iconImage;
|
8742
|
+
canvas.renderAll();
|
8743
|
+
if (textSelected.aCoords.tr.x > 480) {
|
8744
|
+
return;
|
8745
|
+
}
|
8746
|
+
}
|
8747
|
+
} else {
|
8748
|
+
textSelected.charSpacing = e.target.valueAsNumber;
|
8749
|
+
if (currentSelection === 'path') {
|
8750
|
+
textShapeChange(textSelected.shapeType, true);
|
8751
|
+
}
|
8752
|
+
use3dddPlus.getState().updateModifaction(true);
|
8753
|
+
use3dddPlus.getState().forIconCapture();
|
8754
|
+
textSelected.icon = use3dddPlus.getState().iconImage;
|
8755
|
+
canvas.renderAll();
|
8756
|
+
if (textSelected.aCoords.tr.x > 480) {
|
8757
|
+
return;
|
8758
|
+
}
|
8700
8759
|
}
|
8701
8760
|
};
|
8702
8761
|
var textStyle = function textStyle(e, key, value) {
|
@@ -8760,6 +8819,17 @@ var Rightmenu = function Rightmenu() {
|
|
8760
8819
|
});
|
8761
8820
|
}
|
8762
8821
|
// canvas.renderAll();
|
8822
|
+
} else if (data.type === 'path') {
|
8823
|
+
var _C2 = data.fill;
|
8824
|
+
if (_C2 === previousColor) {
|
8825
|
+
data.set({
|
8826
|
+
fill: color,
|
8827
|
+
colorFill: {
|
8828
|
+
layer0: color
|
8829
|
+
}
|
8830
|
+
});
|
8831
|
+
}
|
8832
|
+
// canvas.renderAll();
|
8763
8833
|
} else if (data.type === 'group') {
|
8764
8834
|
// console.log(data);
|
8765
8835
|
var objImage = data._objects;
|
@@ -8896,10 +8966,12 @@ var Rightmenu = function Rightmenu() {
|
|
8896
8966
|
}
|
8897
8967
|
};
|
8898
8968
|
var removeColorPalatte = function removeColorPalatte() {
|
8899
|
-
|
8900
|
-
|
8901
|
-
|
8902
|
-
|
8969
|
+
setDisplayPallet({
|
8970
|
+
visible: false,
|
8971
|
+
property: '',
|
8972
|
+
color: '',
|
8973
|
+
callback: null
|
8974
|
+
});
|
8903
8975
|
};
|
8904
8976
|
useEffect(function () {
|
8905
8977
|
window.addEventListener('click', removeColorPalatte);
|
@@ -8995,7 +9067,8 @@ var Rightmenu = function Rightmenu() {
|
|
8995
9067
|
className: textSelected.fontWeight === 'bold' ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border font-bold border-[#EBEBEB] py-[7px] px-[25px] " : 'bg-[#fff] font-bold text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[25px]',
|
8996
9068
|
style: textSelected && textSelected.shapeType && textSelected.shapeType !== 'none' ? {
|
8997
9069
|
color: '#cccccc',
|
8998
|
-
cursor: 'default'
|
9070
|
+
cursor: 'default',
|
9071
|
+
backgroundColor: '#ffffff'
|
8999
9072
|
} : {},
|
9000
9073
|
onClick: function onClick(e) {
|
9001
9074
|
return textStyle(e, 'fontWeight', 'bold');
|
@@ -9006,7 +9079,8 @@ var Rightmenu = function Rightmenu() {
|
|
9006
9079
|
className: textSelected.fontStyle && textSelected.fontStyle === 'italic' ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border italic border-[#EBEBEB] py-[7px] px-[25px] " : 'bg-[#fff] italic text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[25px]',
|
9007
9080
|
style: textSelected && textSelected.shapeType && textSelected.shapeType !== 'none' ? {
|
9008
9081
|
color: '#cccccc',
|
9009
|
-
cursor: 'default'
|
9082
|
+
cursor: 'default',
|
9083
|
+
backgroundColor: '#ffffff'
|
9010
9084
|
} : {},
|
9011
9085
|
onClick: function onClick(e) {
|
9012
9086
|
return textStyle(e, 'fontStyle', 'italic');
|
@@ -9017,7 +9091,8 @@ var Rightmenu = function Rightmenu() {
|
|
9017
9091
|
className: textSelected.underline && textSelected.underline === true ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border underline border-[#EBEBEB] py-[7px] px-[25px] " : 'bg-[#fff] underline text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[25px]',
|
9018
9092
|
style: textSelected && textSelected.shapeType && textSelected.shapeType !== 'none' ? {
|
9019
9093
|
color: '#cccccc',
|
9020
|
-
cursor: 'default'
|
9094
|
+
cursor: 'default',
|
9095
|
+
backgroundColor: '#ffffff'
|
9021
9096
|
} : {},
|
9022
9097
|
onClick: function onClick(e) {
|
9023
9098
|
return textStyle(e, 'underline', !fontStyle.underline);
|
@@ -9062,7 +9137,10 @@ var Rightmenu = function Rightmenu() {
|
|
9062
9137
|
handleChange: textColorChange,
|
9063
9138
|
property: 'backgroundColor',
|
9064
9139
|
name: 'backgroundColor',
|
9065
|
-
color: activeSelection.fill
|
9140
|
+
color: activeSelection.fill,
|
9141
|
+
setDisplayPallet: setDisplayPallet,
|
9142
|
+
setPosition: setPosition,
|
9143
|
+
callback: textColorChange
|
9066
9144
|
})), React.createElement("div", {
|
9067
9145
|
className: "flex gap-2 mt-4"
|
9068
9146
|
}, React.createElement("div", null, React.createElement("div", {
|
@@ -9084,7 +9162,10 @@ var Rightmenu = function Rightmenu() {
|
|
9084
9162
|
handleChange: strokeColorChange,
|
9085
9163
|
property: 'backgroundColor',
|
9086
9164
|
name: 'backgroundColor',
|
9087
|
-
color: activeSelection.stroke
|
9165
|
+
color: activeSelection.stroke,
|
9166
|
+
setDisplayPallet: setDisplayPallet,
|
9167
|
+
setPosition: setPosition,
|
9168
|
+
callback: strokeColorChange
|
9088
9169
|
})))), React.createElement("div", {
|
9089
9170
|
className: "flex gap-2"
|
9090
9171
|
}, React.createElement("div", null, React.createElement("div", {
|
@@ -9130,7 +9211,10 @@ var Rightmenu = function Rightmenu() {
|
|
9130
9211
|
key: 'color-' + i,
|
9131
9212
|
handleChange: changeSVGColor,
|
9132
9213
|
property: item,
|
9133
|
-
color: activeSelection.colorFill[item]
|
9214
|
+
color: activeSelection.colorFill[item],
|
9215
|
+
setDisplayPallet: setDisplayPallet,
|
9216
|
+
setPosition: setPosition,
|
9217
|
+
callback: changeSVGColor
|
9134
9218
|
});
|
9135
9219
|
}))), React.createElement(React.Fragment, null, React.createElement("div", {
|
9136
9220
|
className: "my-[24.5px]"
|
@@ -9166,13 +9250,25 @@ var Rightmenu = function Rightmenu() {
|
|
9166
9250
|
}, "Color in Canvas"), React.createElement("div", {
|
9167
9251
|
className: "flex flex-wrap gap-x-[1rem] mt-[12px] mb-[12px]"
|
9168
9252
|
}, allColor == null ? void 0 : allColor.map(function (item, i) {
|
9169
|
-
return
|
9170
|
-
|
9171
|
-
|
9172
|
-
|
9173
|
-
|
9174
|
-
|
9175
|
-
|
9253
|
+
return (
|
9254
|
+
// <ColorImpl
|
9255
|
+
// mClass={'mb-[10px]'}
|
9256
|
+
// key={'color-' + i}
|
9257
|
+
// handleChange={changeSVGTextColor}
|
9258
|
+
// property={item}
|
9259
|
+
// color={item}
|
9260
|
+
// />
|
9261
|
+
React.createElement(ColorImpl, {
|
9262
|
+
mClass: 'mb-[10px]',
|
9263
|
+
key: 'color-' + i,
|
9264
|
+
handleChange: changeSVGTextColor,
|
9265
|
+
property: item,
|
9266
|
+
color: item,
|
9267
|
+
setDisplayPallet: setDisplayPallet,
|
9268
|
+
setPosition: setPosition,
|
9269
|
+
callback: changeSVGTextColor
|
9270
|
+
})
|
9271
|
+
);
|
9176
9272
|
})), (allColor && allColor.includes('transparent') ? allColor.length - 1 : allColor.length) > 8 && React.createElement(errorPopup, {
|
9177
9273
|
allColor: allColor
|
9178
9274
|
})), currentSelection === 'none' && React.createElement(React.Fragment, null, React.createElement("div", {
|
@@ -9180,13 +9276,25 @@ var Rightmenu = function Rightmenu() {
|
|
9180
9276
|
}, "Color in Canvas"), React.createElement("div", {
|
9181
9277
|
className: "flex flex-wrap gap-x-[1rem] mt-[12px]"
|
9182
9278
|
}, allColor == null ? void 0 : allColor.map(function (item, i) {
|
9183
|
-
return
|
9184
|
-
|
9185
|
-
|
9186
|
-
|
9187
|
-
|
9188
|
-
|
9189
|
-
|
9279
|
+
return (
|
9280
|
+
// <ColorImpl
|
9281
|
+
// mClass={'mb-[10px]'}
|
9282
|
+
// key={'color-' + i}
|
9283
|
+
// handleChange={changeSVGTextColor}
|
9284
|
+
// property={item}
|
9285
|
+
// color={item}
|
9286
|
+
// />
|
9287
|
+
React.createElement(ColorImpl, {
|
9288
|
+
mClass: 'mb-[10px]',
|
9289
|
+
key: 'color-' + i,
|
9290
|
+
handleChange: changeSVGTextColor,
|
9291
|
+
property: item,
|
9292
|
+
color: item,
|
9293
|
+
setDisplayPallet: setDisplayPallet,
|
9294
|
+
setPosition: setPosition,
|
9295
|
+
callback: changeSVGTextColor
|
9296
|
+
})
|
9297
|
+
);
|
9190
9298
|
})), (allColor && allColor.includes('transparent') ? allColor.length - 1 : allColor.length) > 8 && React.createElement(errorPopup, {
|
9191
9299
|
allColor: allColor
|
9192
9300
|
}))), isNextClicked && conflictColors && conflictColors.length > 0 && React.createElement("div", {
|
@@ -9357,7 +9465,26 @@ var Rightmenu = function Rightmenu() {
|
|
9357
9465
|
}), React.createElement("path", {
|
9358
9466
|
d: "M121.752,335.085L256,200.837l134.248,134.248c8.331,8.331,21.839,8.331,30.17,0c8.331-8.331,8.331-21.839,0-30.17 L271.085,155.582c-8.331-8.331-21.839-8.331-30.17,0L91.582,304.915c-8.331,8.331-8.331,21.839,0,30.17 S113.42,343.416,121.752,335.085z"
|
9359
9467
|
})))))))))));
|
9360
|
-
}))))))
|
9468
|
+
})))))), displayPallet && displayPallet.visible && React.createElement(ColorPalette, {
|
9469
|
+
mainClass: "left-0",
|
9470
|
+
handleColorChange: function handleColorChange(color) {
|
9471
|
+
displayPallet.callback(displayPallet.property, color);
|
9472
|
+
setDisplayPallet({
|
9473
|
+
visible: false,
|
9474
|
+
property: '',
|
9475
|
+
color: '',
|
9476
|
+
callback: null
|
9477
|
+
});
|
9478
|
+
},
|
9479
|
+
style: position ? {
|
9480
|
+
position: 'fixed',
|
9481
|
+
left: position.x - 450,
|
9482
|
+
top: position.y - 5,
|
9483
|
+
width: '450px'
|
9484
|
+
} : {
|
9485
|
+
display: 'none'
|
9486
|
+
}
|
9487
|
+
}));
|
9361
9488
|
};
|
9362
9489
|
|
9363
9490
|
var css_248z$5 = "#ls{//top:8rem;background-color:#fff;background:radial-gradient(#eee,#ccc);height:100%;left:0;opacity:1;position:relative;transition:opacity 1s;width:100%;z-index:100}#ls.fade-out{opacity:0}#l{animation:spin 2s linear infinite;border:3px solid transparent;border-radius:50%;border-top-color:#b16b6b;display:block;height:100px;left:50%;margin:-50px 0 0 -50px;position:relative;top:50%;width:100px}#l:before{animation:spin 3s linear infinite;border:3px solid transparent;border-radius:50%;border-top-color:#c10909;bottom:5px;left:5px;right:5px;top:5px}#l:after,#l:before{content:\"\";position:absolute}#l:after{animation:spin 1.5s linear infinite;border:3px solid transparent;border-radius:50%;border-top-color:#bb4646;bottom:15px;left:15px;right:15px;top:15px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}";
|