Browse Source

Merge branch 'dev' of http://192.168.0.115:3000/bill/fuse into dev

bill 2 years ago
parent
commit
77ece6f5de

+ 2 - 1
src/views/draw-file/board/editCAD/Controls/UIControl.js

@@ -16,6 +16,7 @@ import { floorplanData } from '../FloorplanData.js'
 import { signService } from '../Service/SignService.js'
 import mitt from 'mitt'
 import {history} from '../History/History.js'
+import { iconService } from '../Service/IconService.js'
 
 export default class UIControl{
     constructor(layer) {
@@ -177,7 +178,7 @@ export default class UIControl{
             } else if (item.type == VectorType.Arrow) {
                 floorplanService.deleteArrow(item.vectorId)
             } else if (item.type == VectorType.Icon) {
-                floorplanService.deleteIcon(item.vectorId)
+                iconService.deleteIcon(item.vectorId)
             }  else if (item.type == VectorType.Tag) {
                 floorplanService.deleteTag(item.vectorId)
             } else if (item.type == VectorType.Table) {

+ 1 - 1
src/views/draw-file/board/editCAD/History/History.js

@@ -467,7 +467,7 @@ export default class History {
                 let vIcon = iconService.createIcon(item.icon.points[0],item.icon.points[2],item.icon.value,item.icon.id)
                 historyUtil.assignIconFromIcon(vIcon, item.icon)
             } else if (item.handle == HistoryEvents.DeleteIcon) {
-                floorplanService.deleteIcon(item.icon.id)
+                iconService.deleteIcon(item.icon.id)
             } else if (item.handle == HistoryEvents.ModifyIcon) {
                 const currentIcon = item.curIcon
                 let preIcon = floorplanService.getIcon(item.curIcon.id)

+ 2 - 1
src/views/draw-file/board/editCAD/Layer.js

@@ -34,6 +34,7 @@ import MathUtil, { mathUtil } from './MathUtil'
 import { wallService } from './Service/WallService'
 import {history} from './History/History.js'
 import { signService } from './Service/SignService'
+import { iconService } from './Service/IconService'
 
 export default class Layer {
     constructor() {
@@ -647,7 +648,7 @@ export default class Layer {
             case LayerEvents.AddingIcon:
                 if(addIcon.end != null && addIcon.currentVectorId != null){
                     if(mathUtil.getDistance(addIcon.start,addIcon.end)<Constant.minAdsorb){
-                        floorplanService.deleteIcon(addIcon.currentVectorId)
+                        iconService.deleteIcon(addIcon.currentVectorId)
                     }
                     needAutoRedraw = true
                 }