@meta2d/core 1.0.75 → 1.0.76

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/src/core.js CHANGED
@@ -182,7 +182,7 @@ export class Meta2d {
182
182
  ruleColor: this.store.theme[theme].ruleColor,
183
183
  ruleOptions: this.store.theme[theme].ruleOptions,
184
184
  });
185
- // 更新全局的主题css变量
185
+ // 更新全局的主题css变量
186
186
  le5leTheme.updateCssRule(this.store.id, theme);
187
187
  this.canvas.initGlobalStyle();
188
188
  for (let i = 0; i < this.store.data.pens.length; i++) {
@@ -418,7 +418,10 @@ export class Meta2d {
418
418
  }
419
419
  }
420
420
  });
421
- const data = this.getEventData(e.list, pen);
421
+ let data = this.getEventData(e.list, pen);
422
+ if (Object.keys(data).length) {
423
+ data = null;
424
+ }
422
425
  this.canvas.dialog.show(e.value, url, e.extend, data);
423
426
  }
424
427
  };
@@ -609,6 +612,7 @@ export class Meta2d {
609
612
  const data = await getMeta2dData(this.store, id);
610
613
  if (data) {
611
614
  this.open(data);
615
+ this.lock(1);
612
616
  this.fitView(true, 10);
613
617
  }
614
618
  }
@@ -834,7 +838,7 @@ export class Meta2d {
834
838
  this.clear(false, data?.template);
835
839
  this.canvas.autoPolylineFlag = true;
836
840
  if (data) {
837
- // 根据图纸的主题设置主题
841
+ // 根据图纸的主题设置主题
838
842
  if (data.theme) {
839
843
  this.setTheme(data.theme);
840
844
  }
@@ -869,9 +873,9 @@ export class Meta2d {
869
873
  this.canvas.opening = true;
870
874
  }
871
875
  this.doInitJS();
872
- this.doInitFn();
873
876
  this.initBindDatas();
874
877
  this.initBinds();
878
+ this.doInitFn();
875
879
  this.initMessageEvents();
876
880
  this.initGlobalTriggers();
877
881
  this.startAnimate();
@@ -2260,7 +2264,7 @@ export class Meta2d {
2260
2264
  // token
2261
2265
  // );
2262
2266
  // this.iotWebsocketClient.onmessage = (e) => {
2263
- // this.socketCallback(e.data, { type: 'iot', method: 'websocket' });
2267
+ // this.socketCallback(e.data, { type: 'iot', method: 'websocket' });
2264
2268
  // };
2265
2269
  // this.iotWebsocketClient.onerror = (error) => {
2266
2270
  // this.store.emitter.emit('error', { type: 'websocket', error });