@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
@@ -2880,9 +2880,10 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
2880
2880
|
use3dddPlus.setState({
|
2881
2881
|
selectedStepper: undefined
|
2882
2882
|
});
|
2883
|
-
get().
|
2883
|
+
get().loadMascots(logos);
|
2884
2884
|
},
|
2885
|
-
|
2885
|
+
loadMascots: function loadMascots(data) {
|
2886
|
+
console.log(data);
|
2886
2887
|
fabric.fabric.loadSVGFromURL(data, function (objects, options) {
|
2887
2888
|
var loadedObject = fabric.fabric.util.groupSVGElements(objects, options);
|
2888
2889
|
loadedObject.scaleToWidth(450);
|
@@ -2945,6 +2946,9 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
2945
2946
|
//@ts-ignore
|
2946
2947
|
loadedObject.icon = use3dddPlus.getState().iconImage;
|
2947
2948
|
use3dddPlus.getState().updateModifaction(true);
|
2949
|
+
use3dddPlus.setState({
|
2950
|
+
loading: false
|
2951
|
+
});
|
2948
2952
|
});
|
2949
2953
|
},
|
2950
2954
|
myLogoHandler: function myLogoHandler(logo) {
|
@@ -4037,6 +4041,15 @@ var optionpresets = {
|
|
4037
4041
|
}; // End of optionpresets
|
4038
4042
|
|
4039
4043
|
var converterSlice = function converterSlice(set, get) {
|
4044
|
+
// 1.Loading the image
|
4045
|
+
//2. Loading the string and grouping it
|
4046
|
+
//3. Pharing the SVG and returning the path and attriubutes
|
4047
|
+
// 4. Grouping the loaded image usung groupSVGElement
|
4048
|
+
//5. Check which canvas to load "POPUPCANVAS" or"FABRICCANVAS"
|
4049
|
+
//6. Scaling the image to fit into canvas
|
4050
|
+
//7. Detecting the colors from the image
|
4051
|
+
//8. Adding the checker box
|
4052
|
+
//9. loading the image into canavas
|
4040
4053
|
var processImage = function processImage(svgstr, colorValue, canvasToLoad, addCheckerBox) {
|
4041
4054
|
if (canvasToLoad === void 0) {
|
4042
4055
|
canvasToLoad = use3dddPlus.getState().popupCanv;
|
@@ -4387,29 +4400,26 @@ var converterSlice = function converterSlice(set, get) {
|
|
4387
4400
|
}
|
4388
4401
|
return aiConvert;
|
4389
4402
|
}(),
|
4390
|
-
//
|
4403
|
+
// @ts-ignore
|
4391
4404
|
loadImageFromURL: function () {
|
4392
|
-
var _loadImageFromURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url) {
|
4393
|
-
var response;
|
4405
|
+
var _loadImageFromURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, canvasToLoad, createCheckerBox) {
|
4394
4406
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
4395
4407
|
while (1) switch (_context3.prev = _context3.next) {
|
4396
4408
|
case 0:
|
4397
4409
|
console.log('---.', url);
|
4398
|
-
|
4399
|
-
|
4400
|
-
case 3:
|
4401
|
-
response = _context3.sent;
|
4410
|
+
// return await requests.get(url + "?timestamp=" + Date.now());
|
4411
|
+
// const response = await fetch(url);
|
4402
4412
|
// const blob = await response.text();
|
4403
|
-
use3dddPlus.getState().testSVG(response);
|
4404
4413
|
// processImage(blob, 8, canvasToLoad, createCheckerBox);
|
4414
|
+
use3dddPlus.getState().loadMascots(url);
|
4405
4415
|
// return url;
|
4406
|
-
case
|
4416
|
+
case 2:
|
4407
4417
|
case "end":
|
4408
4418
|
return _context3.stop();
|
4409
4419
|
}
|
4410
4420
|
}, _callee3);
|
4411
4421
|
}));
|
4412
|
-
function loadImageFromURL(_x3) {
|
4422
|
+
function loadImageFromURL(_x3, _x4, _x5) {
|
4413
4423
|
return _loadImageFromURL.apply(this, arguments);
|
4414
4424
|
}
|
4415
4425
|
return loadImageFromURL;
|
@@ -4675,7 +4685,7 @@ var converterSlice = function converterSlice(set, get) {
|
|
4675
4685
|
}
|
4676
4686
|
}, _callee5);
|
4677
4687
|
}));
|
4678
|
-
function convertPdfToImages(
|
4688
|
+
function convertPdfToImages(_x6) {
|
4679
4689
|
return _convertPdfToImages.apply(this, arguments);
|
4680
4690
|
}
|
4681
4691
|
return convertPdfToImages;
|