同步框架代码

This commit is contained in:
fan 2023-08-04 13:46:41 +08:00
parent a5462d11b7
commit 4613ff43af
3 changed files with 15 additions and 10 deletions

@ -1 +1 @@
Subproject commit 7aff26f0d3dba72592e7eaf8a0ab1637ebc18e4c
Subproject commit 4e785acf070d8810f33b053a8a7c3d41c06f54ee

View File

@ -537,13 +537,18 @@ export class GraphicApp extends EventEmitter<GraphicAppEvents> {
state.code,
state.graphicType
);
if (!g) {
const template = this.getGraphicTemplatesByType(state.graphicType);
const g = template.new();
g.loadState(state);
this.addGraphics(g);
} else if (g.updateStates(state)) {
g.repaint();
try {
if (!g) {
const template = this.getGraphicTemplatesByType(state.graphicType);
const g = template.new();
g.loadState(state);
this.addGraphics(g);
} else if (g.updateStates(state)) {
g.repaint();
}
} catch (err) {
console.error('图形状态处理异常', g, state, err);
// throw err;
}
});
}

View File

@ -127,8 +127,8 @@ export class SubscriptionClient {
trySubscribe(): void {
if (this.mc.connected) {
this.unsubscriptor = this.mc.subscribe(this.destination, () => {
this.handleMessage;
this.unsubscriptor = this.mc.subscribe(this.destination, (data) => {
this.handleMessage(data);
});
}
}