@threedddplus/logoeditor 0.0.155 → 0.0.157
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 +23 -13
- 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 +23 -13
- package/dist/logoeditor.esm.js.map +1 -1
- package/dist/store/fabric/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -2871,9 +2871,10 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
2871
2871
|
use3dddPlus.setState({
|
2872
2872
|
selectedStepper: undefined
|
2873
2873
|
});
|
2874
|
-
get().
|
2874
|
+
get().loadMascots(logos);
|
2875
2875
|
},
|
2876
|
-
|
2876
|
+
loadMascots: function loadMascots(data) {
|
2877
|
+
console.log(data);
|
2877
2878
|
fabric.loadSVGFromURL(data, function (objects, options) {
|
2878
2879
|
var loadedObject = fabric.util.groupSVGElements(objects, options);
|
2879
2880
|
loadedObject.scaleToWidth(450);
|
@@ -2936,6 +2937,9 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
2936
2937
|
//@ts-ignore
|
2937
2938
|
loadedObject.icon = use3dddPlus.getState().iconImage;
|
2938
2939
|
use3dddPlus.getState().updateModifaction(true);
|
2940
|
+
use3dddPlus.setState({
|
2941
|
+
loading: false
|
2942
|
+
});
|
2939
2943
|
});
|
2940
2944
|
},
|
2941
2945
|
myLogoHandler: function myLogoHandler(logo) {
|
@@ -4028,6 +4032,15 @@ var optionpresets = {
|
|
4028
4032
|
}; // End of optionpresets
|
4029
4033
|
|
4030
4034
|
var converterSlice = function converterSlice(set, get) {
|
4035
|
+
// 1.Loading the image
|
4036
|
+
//2. Loading the string and grouping it
|
4037
|
+
//3. Pharing the SVG and returning the path and attriubutes
|
4038
|
+
// 4. Grouping the loaded image usung groupSVGElement
|
4039
|
+
//5. Check which canvas to load "POPUPCANVAS" or"FABRICCANVAS"
|
4040
|
+
//6. Scaling the image to fit into canvas
|
4041
|
+
//7. Detecting the colors from the image
|
4042
|
+
//8. Adding the checker box
|
4043
|
+
//9. loading the image into canavas
|
4031
4044
|
var processImage = function processImage(svgstr, colorValue, canvasToLoad, addCheckerBox) {
|
4032
4045
|
if (canvasToLoad === void 0) {
|
4033
4046
|
canvasToLoad = use3dddPlus.getState().popupCanv;
|
@@ -4378,29 +4391,26 @@ var converterSlice = function converterSlice(set, get) {
|
|
4378
4391
|
}
|
4379
4392
|
return aiConvert;
|
4380
4393
|
}(),
|
4381
|
-
//
|
4394
|
+
// @ts-ignore
|
4382
4395
|
loadImageFromURL: function () {
|
4383
|
-
var _loadImageFromURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url) {
|
4384
|
-
var response;
|
4396
|
+
var _loadImageFromURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, canvasToLoad, createCheckerBox) {
|
4385
4397
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
4386
4398
|
while (1) switch (_context3.prev = _context3.next) {
|
4387
4399
|
case 0:
|
4388
4400
|
console.log('---.', url);
|
4389
|
-
|
4390
|
-
|
4391
|
-
case 3:
|
4392
|
-
response = _context3.sent;
|
4401
|
+
// return await requests.get(url + "?timestamp=" + Date.now());
|
4402
|
+
// const response = await fetch(url);
|
4393
4403
|
// const blob = await response.text();
|
4394
|
-
use3dddPlus.getState().testSVG(response);
|
4395
4404
|
// processImage(blob, 8, canvasToLoad, createCheckerBox);
|
4405
|
+
use3dddPlus.getState().loadMascots(url);
|
4396
4406
|
// return url;
|
4397
|
-
case
|
4407
|
+
case 2:
|
4398
4408
|
case "end":
|
4399
4409
|
return _context3.stop();
|
4400
4410
|
}
|
4401
4411
|
}, _callee3);
|
4402
4412
|
}));
|
4403
|
-
function loadImageFromURL(_x3) {
|
4413
|
+
function loadImageFromURL(_x3, _x4, _x5) {
|
4404
4414
|
return _loadImageFromURL.apply(this, arguments);
|
4405
4415
|
}
|
4406
4416
|
return loadImageFromURL;
|
@@ -4666,7 +4676,7 @@ var converterSlice = function converterSlice(set, get) {
|
|
4666
4676
|
}
|
4667
4677
|
}, _callee5);
|
4668
4678
|
}));
|
4669
|
-
function convertPdfToImages(
|
4679
|
+
function convertPdfToImages(_x6) {
|
4670
4680
|
return _convertPdfToImages.apply(this, arguments);
|
4671
4681
|
}
|
4672
4682
|
return convertPdfToImages;
|