@tmagic/editor 1.0.0-beta.10 → 1.0.0-beta.11

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-beta.10",
2
+ "version": "1.0.0-beta.11",
3
3
  "name": "@tmagic/editor",
4
4
  "sideEffects": false,
5
5
  "main": "dist/tmagic-editor.umd.js",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@element-plus/icons": "0.0.11",
31
- "@tmagic/core": "^1.0.0-beta.10",
32
- "@tmagic/form": "^1.0.0-beta.10",
33
- "@tmagic/schema": "^1.0.0-beta.10",
34
- "@tmagic/stage": "^1.0.0-beta.10",
35
- "@tmagic/utils": "^1.0.0-beta.10",
31
+ "@tmagic/core": "^1.0.0-beta.11",
32
+ "@tmagic/form": "^1.0.0-beta.11",
33
+ "@tmagic/schema": "^1.0.0-beta.11",
34
+ "@tmagic/stage": "^1.0.0-beta.11",
35
+ "@tmagic/utils": "^1.0.0-beta.11",
36
36
  "color": "^3.1.3",
37
37
  "element-plus": "^2.1.7",
38
38
  "events": "^3.3.0",
@@ -56,5 +56,5 @@
56
56
  "vite-plugin-dts": "^0.9.6",
57
57
  "vue-tsc": "^0.0.24"
58
58
  },
59
- "gitHead": "fc39ecb4f5b117a4ebbfd115382887983cb8f9de"
59
+ "gitHead": "db274d495f44030a788dee585f7fba53b6a3407e"
60
60
  }
@@ -339,9 +339,10 @@ class Editor extends BaseService {
339
339
 
340
340
  if (`${newConfig.id}` === `${this.get('node').id}`) {
341
341
  this.set('node', newConfig);
342
- this.get<StageCore | null>('stage')?.update({ config: cloneDeep(newConfig), root: this.get('root') });
343
342
  }
344
343
 
344
+ this.get<StageCore | null>('stage')?.update({ config: cloneDeep(newConfig), root: this.get('root') });
345
+
345
346
  if (newConfig.type === NodeType.PAGE) {
346
347
  this.set('page', newConfig);
347
348
  }
@@ -520,7 +521,11 @@ class Editor extends BaseService {
520
521
  this.isHistoryStateChange = true;
521
522
  await this.update(value.data);
522
523
  this.set('modifiedNodeIds', value.modifiedNodeIds);
523
- setTimeout(() => value.nodeId && this.select(value.nodeId), 0);
524
+ setTimeout(async () => {
525
+ if (!value.nodeId) return;
526
+ await this.select(value.nodeId);
527
+ this.get<StageCore | null>('stage')?.select(value.nodeId);
528
+ }, 0);
524
529
  }
525
530
 
526
531
  private async toggleFixedPosition(dist: MNode, src: MNode, root: MApp) {