|
@@ -51,49 +51,49 @@ export default class UIControl {
|
|
|
elementService.hideAll()
|
|
|
//正在添加tag的时候,需要先删除
|
|
|
const eventName = stateService.getEventName()
|
|
|
- if (eventName == LayerEvents.AddTag) {
|
|
|
- let item = stateService.getDraggingItem()
|
|
|
- if (item && item.type == VectorType.Tag) {
|
|
|
- floorplanService.deleteTag(item.vectorId)
|
|
|
- }
|
|
|
- }
|
|
|
- stateService.clearItems()
|
|
|
- if (this.selectUI == UIEvents.Wall || this.selectUI == UIEvents.OutWall) {
|
|
|
+ // if (eventName == LayerEvents.AddTag) {
|
|
|
+ // let item = stateService.getDraggingItem()
|
|
|
+ // if (item && item.type == VectorType.Tag) {
|
|
|
+ // floorplanService.deleteTag(item.vectorId)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // stateService.clearItems()
|
|
|
+ if (this.selectUI == UIEvents.Wall)
|
|
|
+ {
|
|
|
stateService.setEventName(LayerEvents.AddWall)
|
|
|
- } else if (
|
|
|
- this.selectUI == UIEvents.SingleDoor ||
|
|
|
- this.selectUI == UIEvents.DoubleDoor ||
|
|
|
- this.selectUI == UIEvents.SlideDoor ||
|
|
|
- this.selectUI == UIEvents.SingleWindow ||
|
|
|
- this.selectUI == UIEvents.BayWindow ||
|
|
|
- this.selectUI == UIEvents.FrenchWindow ||
|
|
|
- this.selectUI == UIEvents.Pass
|
|
|
- ) {
|
|
|
- stateService.setEventName(LayerEvents.AddSymbol)
|
|
|
- } else if (this.selectUI == UIEvents.Tag) {
|
|
|
+ }
|
|
|
+ else if (this.selectUI == UIEvents.Table )
|
|
|
+ {
|
|
|
+ stateService.setEventName(LayerEvents.Table)
|
|
|
+ }
|
|
|
+ else if (this.selectUI == UIEvents.Rectangle )
|
|
|
+ {
|
|
|
+ stateService.setEventName(LayerEvents.Rectangle)
|
|
|
+ }
|
|
|
+ else if (this.selectUI == UIEvents.Circle )
|
|
|
+ {
|
|
|
+ stateService.setEventName(LayerEvents.Circle)
|
|
|
+ }
|
|
|
+ else if (this.selectUI == UIEvents.Arrow )
|
|
|
+ {
|
|
|
+ stateService.setEventName(LayerEvents.Arrow)
|
|
|
+ }
|
|
|
+ else if (this.selectUI == UIEvents.Icon )
|
|
|
+ {
|
|
|
+ stateService.setEventName(LayerEvents.Icon)
|
|
|
+ }
|
|
|
+ else if (this.selectUI == UIEvents.Tag)
|
|
|
+ {
|
|
|
stateService.setEventName(LayerEvents.AddTag)
|
|
|
- } else if (
|
|
|
- this.selectUI == UIEvents.TV ||
|
|
|
- this.selectUI == UIEvents.CombinationSofa ||
|
|
|
- this.selectUI == UIEvents.SingleSofa ||
|
|
|
- this.selectUI == UIEvents.TeaTable ||
|
|
|
- this.selectUI == UIEvents.Carpet ||
|
|
|
- this.selectUI == UIEvents.Plant ||
|
|
|
- this.selectUI == UIEvents.DiningTable ||
|
|
|
- this.selectUI == UIEvents.DoubleBed ||
|
|
|
- this.selectUI == UIEvents.SingleBed ||
|
|
|
- this.selectUI == UIEvents.Wardrobe ||
|
|
|
- this.selectUI == UIEvents.Dresser ||
|
|
|
- this.selectUI == UIEvents.BedsideCupboard ||
|
|
|
- this.selectUI == UIEvents.Pillow ||
|
|
|
- this.selectUI == UIEvents.GasStove ||
|
|
|
- this.selectUI == UIEvents.Cupboard ||
|
|
|
- this.selectUI == UIEvents.Bathtub ||
|
|
|
- this.selectUI == UIEvents.Closestool ||
|
|
|
- this.selectUI == UIEvents.Washstand ||
|
|
|
- this.selectUI == UIEvents.Desk ||
|
|
|
- this.selectUI == UIEvents.BalconyChair ||
|
|
|
- this.selectUI == UIEvents.Elevator
|
|
|
+ }
|
|
|
+ else if (
|
|
|
+ this.selectUI == UIEvents.Cigaret ||
|
|
|
+ this.selectUI == UIEvents.FirePoint ||
|
|
|
+ this.selectUI == UIEvents.FootPrint ||
|
|
|
+ this.selectUI == UIEvents.ShoePrint ||
|
|
|
+ this.selectUI == UIEvents.FingerPrint ||
|
|
|
+ this.selectUI == UIEvents.DeadBody ||
|
|
|
+ this.selectUI == UIEvents.BloodStain
|
|
|
) {
|
|
|
stateService.setEventName(LayerEvents.AddSign)
|
|
|
}
|
|
@@ -110,7 +110,7 @@ export default class UIControl {
|
|
|
let item = stateService.getFocusItem()
|
|
|
switch (name) {
|
|
|
case 'remove':
|
|
|
- if (type == VectorType.Wall || type == 'OutWall') {
|
|
|
+ if (type == VectorType.Wall) {
|
|
|
floorplanService.deleteWall(item.vectorId)
|
|
|
} else if (type == VectorType.Tag) {
|
|
|
floorplanService.deleteTag(item.vectorId)
|