优化调整bug
This commit is contained in:
@@ -115,24 +115,8 @@ function soonDesign1CaptureDiscPng(canvas, outW, outH) {
|
||||
}
|
||||
}
|
||||
|
||||
function soonStripDesign1HeavyFields(con_o) {
|
||||
if (!con_o) return con_o;
|
||||
delete con_o.frontColorPic;
|
||||
delete con_o.backColorPic;
|
||||
delete con_o.frontBlackPic;
|
||||
delete con_o.backBlackPic;
|
||||
delete con_o.frontData;
|
||||
delete con_o.backData;
|
||||
delete con_o.backDisplayPic;
|
||||
if (typeof con_o.frontDisplayPic === 'string' && con_o.frontDisplayPic.length > 120000) {
|
||||
delete con_o.frontDisplayPic;
|
||||
}
|
||||
return con_o;
|
||||
}
|
||||
|
||||
function soonNormalizeSoonJson(j) {
|
||||
if (!j || typeof j !== 'object') return null;
|
||||
soonStripDesign1HeavyFields(j);
|
||||
if (!j.f || !j.f.objects || !Array.isArray(j.f.objects)) {
|
||||
if (j.objects && Array.isArray(j.objects) && j.objects.length > 0) {
|
||||
j.f = { version: j.version || '4.6.0', objects: j.objects, hoverCursor: j.hoverCursor || 'move' };
|
||||
@@ -1417,7 +1401,6 @@ function saveAs(op1, callback) {
|
||||
let con_o = Object.assign(o, op1);
|
||||
con_o.soonType = 1;
|
||||
if (typeof window.soonApplySavePreview === 'function') window.soonApplySavePreview(con_o, canvas1);
|
||||
soonStripDesign1HeavyFields(con_o);
|
||||
var dialogApi = (typeof dialog !== 'undefined' && dialog) ? dialog : (window.platformBridge && window.platformBridge.showSaveDialog ? { showSaveDialog: function(opts) { return window.platformBridge.showSaveDialog(opts); } } : null);
|
||||
if (!dialogApi) return;
|
||||
dialogApi.showSaveDialog({
|
||||
@@ -1485,7 +1468,6 @@ function save(op1, callback) {
|
||||
let con_o = Object.assign(o, op1);
|
||||
con_o.soonType = 1;
|
||||
if (typeof window.soonApplySavePreview === 'function') window.soonApplySavePreview(con_o, canvas1);
|
||||
soonStripDesign1HeavyFields(con_o);
|
||||
if (openAs.name != "") {
|
||||
var content = JSON.stringify(con_o);
|
||||
if (isWebPortal() && openAs.name.indexOf('soondesign_session:') === 0) {
|
||||
|
||||
Reference in New Issue
Block a user