|
@@ -20,12 +20,12 @@ const meta2dDom = ref('');
|
|
|
|
|
|
const meta2dOptions: Options = {
|
|
|
cdn,
|
|
|
- background: '#1e2430',
|
|
|
- x: 10,
|
|
|
- y: 10,
|
|
|
- width: 1920,
|
|
|
- color: '#bdc7db',
|
|
|
- height: 1080,
|
|
|
+ // background: '#1e2430',
|
|
|
+ // x: 10,
|
|
|
+ // y: 10,
|
|
|
+ // width: 1920,
|
|
|
+ // color: '#bdc7db',
|
|
|
+ // height: 1080,
|
|
|
defaultFormat: { ...defaultFormat },
|
|
|
};
|
|
|
|
|
@@ -81,13 +81,27 @@ const watcher = watch(
|
|
|
const open = async () => {
|
|
|
if (route.query.id) {
|
|
|
const ret: any = await getLe5leV(route.query.id + '');
|
|
|
- ret && ret.data && meta2d.open(ret.data);
|
|
|
+ if(ret && ret.data){
|
|
|
+ if(!ret.data.background){
|
|
|
+ ret.data.background = '#1e2430';
|
|
|
+ }
|
|
|
+ if(!ret.data.color){
|
|
|
+ ret.data.color = '#bdc7db';
|
|
|
+ }
|
|
|
+ meta2d.open(ret.data);
|
|
|
+ }
|
|
|
} else {
|
|
|
let data: any = await localforage.getItem(localStorageName);
|
|
|
if (data) {
|
|
|
data = JSON.parse(data);
|
|
|
data.locked = 1;
|
|
|
data.rule = false;
|
|
|
+ if(!data.background){
|
|
|
+ data.background = '#1e2430';
|
|
|
+ }
|
|
|
+ if(!data.color){
|
|
|
+ data.color = '#bdc7db';
|
|
|
+ }
|
|
|
meta2d.open(data);
|
|
|
bgColor.value = data.background;
|
|
|
}
|
|
@@ -101,7 +115,7 @@ const opened = () => {
|
|
|
: (meta2d.store.data as any).scaleMode === '2'
|
|
|
? 'width'
|
|
|
: true;
|
|
|
- meta2d.fitSizeView(fit, 0);
|
|
|
+ meta2d.fitView(fit, 0);
|
|
|
meta2d.setOptions({
|
|
|
scroll: (meta2d.store.data as any).scroll,
|
|
|
disableScale: (meta2d.store.data as any).isDisableScale,
|