框选bugfix
This commit is contained in:
parent
01f2e9cccf
commit
7dcd8cac17
@ -5,6 +5,7 @@ import {
|
||||
getLineNetApp,
|
||||
destroyLineNetApp,
|
||||
} from 'src/drawApp/lineNetApp';
|
||||
import { markRaw } from 'vue';
|
||||
export interface AlarmInfo {
|
||||
id: string;
|
||||
level: string;
|
||||
@ -57,8 +58,8 @@ export const useLineNetStore = defineStore('lineNet', {
|
||||
},
|
||||
initLineNetApp() {
|
||||
const app = initLineNetApp();
|
||||
app.on('graphicselected', () => {
|
||||
this.selectedGraphics = app.selectedGraphics;
|
||||
app.on('graphicselected', (graphics) => {
|
||||
this.selectedGraphics = markRaw(graphics);
|
||||
});
|
||||
this.selectedGraphics = [];
|
||||
return app;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { IJlCanvas, JlGraphic, IGraphicApp } from 'src/jl-graphic';
|
||||
import { initLineApp, getLineApp, destroyLineApp } from 'src/drawApp/lineApp';
|
||||
import { markRaw } from 'vue';
|
||||
|
||||
export const useLineStore = defineStore('line', {
|
||||
state: () => ({
|
||||
@ -39,8 +40,8 @@ export const useLineStore = defineStore('line', {
|
||||
initLineApp(lineId: number) {
|
||||
this.setLineId(lineId);
|
||||
const app = initLineApp(lineId);
|
||||
app.on('graphicselectedchange', () => {
|
||||
this.selectedGraphics = app.selectedGraphics;
|
||||
app.on('graphicselected', (graphics) => {
|
||||
this.selectedGraphics = markRaw(graphics);
|
||||
});
|
||||
this.selectedGraphics = [];
|
||||
return app;
|
||||
|
Loading…
Reference in New Issue
Block a user