优化图片和显示问题
This commit is contained in:
@@ -1442,6 +1442,13 @@ window.openFile = function open(file, jAlready) {
|
||||
if (typeof window.soonReportOpenLoadError === 'function') window.soonReportOpenLoadError('模板/文件加载失败');
|
||||
return;
|
||||
}
|
||||
// 防御性:j.b 缺失时给一个空画布占位(避免 canvas2.loadFromJSON 报 undefined)
|
||||
if (!j.b || typeof j.b !== 'object' || !Array.isArray(j.b.objects)) {
|
||||
if (typeof console !== 'undefined' && console.warn) {
|
||||
console.warn('[design2.openFile] j.b 缺失,自动以空背面回退。文件:', file);
|
||||
}
|
||||
j.b = { version: '4.6.0', objects: [], hoverCursor: 'move' };
|
||||
}
|
||||
function runOpen() {
|
||||
if (!background_image) {
|
||||
if (typeof window.soonReportOpenLoadError === 'function') window.soonReportOpenLoadError('模板/文件加载失败');
|
||||
|
||||
Reference in New Issue
Block a user