|
@@ -1098,9 +1098,15 @@ const open = async (flag: boolean = false) => {
|
|
|
}
|
|
|
}
|
|
|
} else if (flag) {
|
|
|
- const data: string = await localforage.getItem(localStorageName);
|
|
|
+ const data: any =JSON.parse(await localforage.getItem(localStorageName));
|
|
|
+ if(!data.background){
|
|
|
+ data.background = '#1e2430';
|
|
|
+ }
|
|
|
+ if(!data.color){
|
|
|
+ data.color = '#bdc7db';
|
|
|
+ }
|
|
|
if (data) {
|
|
|
- meta2d.open(JSON.parse(data));
|
|
|
+ meta2d.open(data);
|
|
|
}
|
|
|
} else if (!sessionStorage.getItem('opening')) {
|
|
|
meta2d.open({
|
|
@@ -1144,9 +1150,13 @@ const deal2DToV = ()=>{
|
|
|
//大致估算范围是大屏默认范围
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
let origin = meta2d.store.data.origin;
|
|
|
- meta2d.store.data.width = rect.width/scale;
|
|
|
- meta2d.store.data.height = rect.height/scale;
|
|
|
+ if(rect.width/scale > 1920 || rect.height/scale > 1080){
|
|
|
+ //超出大屏默认范围
|
|
|
+ meta2d.store.data.width = rect.width/scale;
|
|
|
+ meta2d.store.data.height = rect.height/scale;
|
|
|
+ }
|
|
|
meta2d.store.data.pens.forEach((pen)=>{
|
|
|
if(pen.locked){
|
|
|
pen.locked = 0;
|