|
@@ -7,7 +7,6 @@ import SelectState from '../enum/SelectState.js'
|
|
import { mathUtil } from '../MathUtil.js'
|
|
import { mathUtil } from '../MathUtil.js'
|
|
import ElementEvents from '../enum/ElementEvents.js'
|
|
import ElementEvents from '../enum/ElementEvents.js'
|
|
import Constant from '../Constant.js'
|
|
import Constant from '../Constant.js'
|
|
-import { compassService } from '../Service/CompassService'
|
|
|
|
import { signService } from '../Service/SignService.js'
|
|
import { signService } from '../Service/SignService.js'
|
|
export default class Draw {
|
|
export default class Draw {
|
|
constructor() {
|
|
constructor() {
|
|
@@ -37,17 +36,12 @@ export default class Draw {
|
|
|
|
|
|
// }
|
|
// }
|
|
|
|
|
|
- drawWall(vector, styleType) {
|
|
|
|
|
|
+ drawWall(vector) {
|
|
let start = floorplanService.getPoint(vector.start)
|
|
let start = floorplanService.getPoint(vector.start)
|
|
let end = floorplanService.getPoint(vector.end)
|
|
let end = floorplanService.getPoint(vector.end)
|
|
|
|
|
|
let points = []
|
|
let points = []
|
|
points.push(start)
|
|
points.push(start)
|
|
- for (let i = 0; i < vector.children.length; ++i) {
|
|
|
|
- let symbol = floorplanService.getSymbol(vector.children[i])
|
|
|
|
- points.push(symbol.startPoint)
|
|
|
|
- points.push(symbol.endPoint)
|
|
|
|
- }
|
|
|
|
points.push(end)
|
|
points.push(end)
|
|
|
|
|
|
points = points.sort(sortNumber.bind(this))
|
|
points = points.sort(sortNumber.bind(this))
|
|
@@ -61,76 +55,26 @@ export default class Draw {
|
|
//this.context.lineJoin= 'miter';
|
|
//this.context.lineJoin= 'miter';
|
|
this.context.strokeStyle = Style.Wall.strokeStyle
|
|
this.context.strokeStyle = Style.Wall.strokeStyle
|
|
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.lineWidth = Style.Wall.important.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Wall.important.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.lineWidth = Style.Wall.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
|
|
+ this.context.lineWidth = Style.Wall.lineWidth * coordinate.ratio
|
|
|
|
+ this.context.strokeStyle = Style.Wall.strokeStyle
|
|
|
|
|
|
const selectItem = stateService.getSelectItem()
|
|
const selectItem = stateService.getSelectItem()
|
|
const draggingItem = stateService.getDraggingItem()
|
|
const draggingItem = stateService.getDraggingItem()
|
|
const focusItem = stateService.getFocusItem()
|
|
const focusItem = stateService.getFocusItem()
|
|
|
|
|
|
- //下载的时候,根据样式
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Wall.important.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Wall.important.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Wall.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Wall.important.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Wall.important.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Wall.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Wall.important.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Wall.important.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Wall.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Wall.important.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Wall.important.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Wall.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
|
|
+ if (selectItem && selectItem.type == VectorType.Wall) {
|
|
|
|
+ if (vector.vectorId == selectItem.vectorId) {
|
|
|
|
+ this.context.strokeStyle = Style.Select.Wall.strokeStyle
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- if (selectItem && selectItem.type == VectorType.Wall) {
|
|
|
|
- if (vector.vectorId == selectItem.vectorId) {
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Wall_out.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.strokeStyle = Style.Select.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.Wall) {
|
|
|
|
- if (vector.vectorId == draggingItem.vectorId) {
|
|
|
|
- if (vector.out || vector.important) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Wall_out.strokeStyle
|
|
|
|
- } else {
|
|
|
|
- this.context.strokeStyle = Style.Select.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ } else if (draggingItem && draggingItem.type == VectorType.Wall) {
|
|
|
|
+ if (vector.vectorId == draggingItem.vectorId) {
|
|
|
|
+ this.context.strokeStyle = Style.Select.Wall.strokeStyle
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
- if (focusItem && focusItem.type == VectorType.Wall) {
|
|
|
|
- if (vector.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Wall.strokeStyle
|
|
|
|
- }
|
|
|
|
|
|
+ if (focusItem && focusItem.type == VectorType.Wall) {
|
|
|
|
+ if (vector.vectorId == focusItem.vectorId) {
|
|
|
|
+ this.context.strokeStyle = Style.Focus.Wall.strokeStyle
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -142,21 +86,6 @@ export default class Draw {
|
|
}
|
|
}
|
|
this.context.stroke()
|
|
this.context.stroke()
|
|
this.context.restore()
|
|
this.context.restore()
|
|
-
|
|
|
|
- // const mid = {
|
|
|
|
- // x: (start.x + end.x) / 2,
|
|
|
|
- // y: (start.y + end.y) / 2,
|
|
|
|
- // }
|
|
|
|
- // this.drawText(mid, vector.vectorId)
|
|
|
|
-
|
|
|
|
- if (
|
|
|
|
- (selectItem && selectItem.type == VectorType.Wall && vector.vectorId == selectItem.vectorId) ||
|
|
|
|
- (draggingItem && draggingItem.type == VectorType.Wall && vector.vectorId == draggingItem.vectorId) ||
|
|
|
|
- (focusItem && focusItem.type == VectorType.Wall && vector.vectorId == focusItem.vectorId)
|
|
|
|
- ) {
|
|
|
|
- //添加测量值
|
|
|
|
- this.drawMeasureTxt(start, end)
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
drawSpecialPoint() {
|
|
drawSpecialPoint() {
|
|
@@ -265,515 +194,6 @@ export default class Draw {
|
|
this.context.restore()
|
|
this.context.restore()
|
|
}
|
|
}
|
|
|
|
|
|
- drawSingleDoor(geometry, styleType, noEnter) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
- const distance = mathUtil.getDistance(points[0], points[1])
|
|
|
|
- this.context.save()
|
|
|
|
-
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.lineCap = 'square'
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
-
|
|
|
|
- let isFill = false
|
|
|
|
-
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.SingleDoor && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Select.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.SingleDoor && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Select.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.SingleDoor) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Focus.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.arcTo(points[2].x, points[2].y, points[3].x, points[3].y, distance) // 创建弧
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
- if (isFill) {
|
|
|
|
- this.context.fill()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.restore()
|
|
|
|
-
|
|
|
|
- if (!noEnter && geometry.enter != null) {
|
|
|
|
- this.drawEntranceDoor(geometry)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- drawDoubleDoor(geometry, styleType, noEnter) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
- const distance = mathUtil.getDistance(points[0], points[1])
|
|
|
|
- this.context.save()
|
|
|
|
-
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.lineCap = 'square'
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
-
|
|
|
|
- let isFill = false
|
|
|
|
-
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.DoubleDoor && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Select.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.DoubleDoor && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Select.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.DoubleDoor) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Focus.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.arcTo(points[4].x, points[4].y, points[5].x, points[5].y, distance) // 创建弧
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
- if (isFill) {
|
|
|
|
- this.context.fill()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.arcTo(points[4].x, points[4].y, points[3].x, points[3].y, distance) // 创建弧
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
- if (isFill) {
|
|
|
|
- this.context.fill()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.restore()
|
|
|
|
-
|
|
|
|
- if (!noEnter && geometry.enter != null) {
|
|
|
|
- this.drawEntranceDoor(geometry)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- drawSlideDoor(geometry, styleType, noEnter) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.save()
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
- //this.context.fillStyle = Style.Symbol.fillStyle
|
|
|
|
-
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.SlideDoor && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.SlideDoor && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.SlideDoor) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.lineTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[3].x, points[3].y)
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[4].x, points[4].y)
|
|
|
|
- this.context.lineTo(points[5].x, points[5].y)
|
|
|
|
- this.context.lineTo(points[6].x, points[6].y)
|
|
|
|
- this.context.lineTo(points[7].x, points[7].y)
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
-
|
|
|
|
- this.context.restore()
|
|
|
|
-
|
|
|
|
- if (!noEnter && geometry.enter != null) {
|
|
|
|
- this.drawEntranceDoor(geometry)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- drawSingleWindow(geometry, styleType) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.save()
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.SingleWindow && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.SingleWindow && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.SingleWindow) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.stroke()
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[3].x, points[3].y)
|
|
|
|
- this.context.lineTo(points[4].x, points[4].y)
|
|
|
|
- this.context.lineTo(points[5].x, points[5].y)
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
- this.context.restore()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- drawBayWindow(geometry, styleType) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.save()
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
- //this.context.fillStyle = Style.Symbol.fillStyle
|
|
|
|
-
|
|
|
|
- let isFill = false
|
|
|
|
-
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.BayWindow && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Select.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.BayWindow && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Select.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.BayWindow) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Focus.Symbol.fillStyle
|
|
|
|
- isFill = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.lineTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[3].x, points[3].y)
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
- if (isFill) {
|
|
|
|
- this.context.fill()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[5].x, points[5].y)
|
|
|
|
- this.context.lineTo(points[6].x, points[6].y)
|
|
|
|
- this.context.lineTo(points[7].x, points[7].y)
|
|
|
|
- this.context.lineTo(points[4].x, points[4].y)
|
|
|
|
- //this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
- this.context.restore()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- drawFrenchWindow(geometry, styleType) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.save()
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
-
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.FrenchWindow && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.FrenchWindow && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.FrenchWindow) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
-
|
|
|
|
- this.context.moveTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[3].x, points[3].y)
|
|
|
|
-
|
|
|
|
- this.context.moveTo(points[4].x, points[4].y)
|
|
|
|
- this.context.lineTo(points[5].x, points[5].y)
|
|
|
|
-
|
|
|
|
- this.context.moveTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[4].x, points[4].y)
|
|
|
|
-
|
|
|
|
- this.context.moveTo(points[3].x, points[3].y)
|
|
|
|
- this.context.lineTo(points[5].x, points[5].y)
|
|
|
|
-
|
|
|
|
- this.context.moveTo(points[6].x, points[6].y)
|
|
|
|
- this.context.lineTo(points[7].x, points[7].y)
|
|
|
|
- this.context.stroke()
|
|
|
|
-
|
|
|
|
- this.context.restore()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- drawPass(geometry, styleType) {
|
|
|
|
- let points2d = geometry.points2d
|
|
|
|
- let points = []
|
|
|
|
- for (let i = 0; i < points2d.length; ++i) {
|
|
|
|
- points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.save()
|
|
|
|
- this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Symbol.strokeStyle
|
|
|
|
-
|
|
|
|
- if (styleType) {
|
|
|
|
- if (styleType == 'style-1') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-2') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-3') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
|
|
|
|
- } else if (styleType == 'style-4') {
|
|
|
|
- this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const selectItem = stateService.getSelectItem()
|
|
|
|
- const draggingItem = stateService.getDraggingItem()
|
|
|
|
- const focusItem = stateService.getFocusItem()
|
|
|
|
-
|
|
|
|
- if (selectItem && selectItem.type == VectorType.Pass && selectItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == selectItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- } else if (draggingItem && draggingItem.type == VectorType.Pass && draggingItem.selectIndex == SelectState.All) {
|
|
|
|
- if (geometry.vectorId == draggingItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Select.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (focusItem && focusItem.type == VectorType.Pass) {
|
|
|
|
- if (geometry.vectorId == focusItem.vectorId) {
|
|
|
|
- this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[0].x, points[0].y)
|
|
|
|
- this.context.lineTo(points[1].x, points[1].y)
|
|
|
|
- this.context.lineTo(points[2].x, points[2].y)
|
|
|
|
- this.context.lineTo(points[3].x, points[3].y)
|
|
|
|
-
|
|
|
|
- this.context.closePath()
|
|
|
|
- this.context.stroke()
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[4].x, points[4].y)
|
|
|
|
- this.context.lineTo(points[5].x, points[5].y)
|
|
|
|
- this.context.setLineDash([3, 2, 2])
|
|
|
|
- //this.context.dashedLine(points[4].x, points[4].y, points[5].x, points[5].y, dashGapArray);
|
|
|
|
- this.context.stroke()
|
|
|
|
-
|
|
|
|
- this.context.beginPath()
|
|
|
|
- this.context.moveTo(points[6].x, points[6].y)
|
|
|
|
- this.context.lineTo(points[7].x, points[7].y)
|
|
|
|
- this.context.setLineDash([3, 2, 2])
|
|
|
|
- //this.context.dashedLine(points[6].x, points[6].y, points[7].x, points[7].y, dashGapArray);
|
|
|
|
- this.context.stroke()
|
|
|
|
- this.context.restore()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
drawTag(geometry, styleType, hide) {
|
|
drawTag(geometry, styleType, hide) {
|
|
this.context.save()
|
|
this.context.save()
|
|
|
|
|
|
@@ -935,19 +355,6 @@ export default class Draw {
|
|
radius = Style.Element.StartAddWall.radius * coordinate.ratio
|
|
radius = Style.Element.StartAddWall.radius * coordinate.ratio
|
|
this.context.strokeStyle = Style.Element.StartAddWall.strokeStyle
|
|
this.context.strokeStyle = Style.Element.StartAddWall.strokeStyle
|
|
this.context.fillStyle = Style.Element.StartAddWall.fillStyle
|
|
this.context.fillStyle = Style.Element.StartAddWall.fillStyle
|
|
- } else if (element.name == ElementEvents.StartSymbolPoints) {
|
|
|
|
- radius = Style.Element.StartSymbolPoints.radius * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Element.StartSymbolPoints.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Element.StartSymbolPoints.fillStyle
|
|
|
|
- } else if (element.name == ElementEvents.EndSymbolPoints) {
|
|
|
|
- radius = Style.Element.EndSymbolPoints.radius * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Element.EndSymbolPoints.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Element.EndSymbolPoints.fillStyle
|
|
|
|
- } else if (element.name == 'pano') {
|
|
|
|
- radius = Style.Pano.radius * coordinate.ratio
|
|
|
|
- this.context.strokeStyle = Style.Pano.strokeStyle
|
|
|
|
- this.context.fillStyle = Style.Pano.fillStyle
|
|
|
|
- this.context.lineWidth = Style.Pano.lineWidth
|
|
|
|
}
|
|
}
|
|
|
|
|
|
this.context.beginPath()
|
|
this.context.beginPath()
|
|
@@ -979,9 +386,6 @@ export default class Draw {
|
|
this.context.strokeStyle = Style.Element.NewWall.strokeStyle
|
|
this.context.strokeStyle = Style.Element.NewWall.strokeStyle
|
|
if (element.state == 'error') {
|
|
if (element.state == 'error') {
|
|
this.context.strokeStyle = Style.Element.NewWall.errorStrokeStyle
|
|
this.context.strokeStyle = Style.Element.NewWall.errorStrokeStyle
|
|
- } else if (element.state == 'normal-out') {
|
|
|
|
- this.context.strokeStyle = Style.Element.NewWall.strokeStyle_out
|
|
|
|
- this.context.lineWidth = Style.Element.NewWall.lineWidth_out * coordinate.ratio
|
|
|
|
}
|
|
}
|
|
} else if (element.name == ElementEvents.CheckLinesX) {
|
|
} else if (element.name == ElementEvents.CheckLinesX) {
|
|
this.context.lineWidth = Style.Element.CheckLinesX.lineWidth * coordinate.ratio
|
|
this.context.lineWidth = Style.Element.CheckLinesX.lineWidth * coordinate.ratio
|
|
@@ -992,17 +396,13 @@ export default class Draw {
|
|
this.context.strokeStyle = Style.Element.CheckLinesY.strokeStyle
|
|
this.context.strokeStyle = Style.Element.CheckLinesY.strokeStyle
|
|
this.context.setLineDash([3, 2, 2])
|
|
this.context.setLineDash([3, 2, 2])
|
|
}
|
|
}
|
|
|
|
+
|
|
this.context.beginPath()
|
|
this.context.beginPath()
|
|
this.context.moveTo(start.x, start.y)
|
|
this.context.moveTo(start.x, start.y)
|
|
this.context.lineTo(end.x, end.y)
|
|
this.context.lineTo(end.x, end.y)
|
|
this.context.stroke()
|
|
this.context.stroke()
|
|
this.context.restore()
|
|
this.context.restore()
|
|
|
|
|
|
- if (element.name == ElementEvents.NewWall) {
|
|
|
|
- //添加测量值
|
|
|
|
- this.drawMeasureTxt(element.start, element.end)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
this.context.save()
|
|
this.context.save()
|
|
this.context.lineWidth = Style.Point.lineWidth * coordinate.ratio
|
|
this.context.lineWidth = Style.Point.lineWidth * coordinate.ratio
|
|
this.context.strokeStyle = Style.Point.strokeStyle
|
|
this.context.strokeStyle = Style.Point.strokeStyle
|
|
@@ -1015,28 +415,6 @@ export default class Draw {
|
|
this.context.restore()
|
|
this.context.restore()
|
|
}
|
|
}
|
|
|
|
|
|
- drawCompass(styleType) {
|
|
|
|
- const padTop = 160
|
|
|
|
- const padRight = 310
|
|
|
|
-
|
|
|
|
- let img = null
|
|
|
|
- if (styleType == 'style-1' || styleType == 'style-3') {
|
|
|
|
- img = compassService.getWhiteImg()
|
|
|
|
- } else {
|
|
|
|
- img = compassService.getBlackImg()
|
|
|
|
- }
|
|
|
|
- let angle = floorplanService.getCompass()
|
|
|
|
-
|
|
|
|
- this.context.save()
|
|
|
|
-
|
|
|
|
- this.context.translate((coordinate.width - padRight) * coordinate.ratio, padTop * coordinate.ratio)
|
|
|
|
- this.context.rotate((angle / 180) * Math.PI)
|
|
|
|
- this.context.scale(coordinate.ratio / 2, coordinate.ratio / 2)
|
|
|
|
- this.context.drawImage(img, -img.width / 2, -img.height / 2)
|
|
|
|
-
|
|
|
|
- this.context.restore()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
setCanvasStyle(style) {
|
|
setCanvasStyle(style) {
|
|
for (const key in style) {
|
|
for (const key in style) {
|
|
if (key != 'isFill' && key != 'isStroke') {
|
|
if (key != 'isFill' && key != 'isStroke') {
|
|
@@ -1047,49 +425,49 @@ export default class Draw {
|
|
|
|
|
|
/*************************************************************************************家具**********************************************************************************************/
|
|
/*************************************************************************************家具**********************************************************************************************/
|
|
drawSign(geometry) {
|
|
drawSign(geometry) {
|
|
- if (geometry.geoType == VectorType.TV) {
|
|
|
|
- this.drawTV(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.CombinationSofa) {
|
|
|
|
- this.drawCombinationSofa(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.SingleSofa) {
|
|
|
|
- this.drawSingleSofa(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.TeaTable) {
|
|
|
|
- this.drawTeaTable(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Carpet) {
|
|
|
|
- this.drawCarpet(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Plant) {
|
|
|
|
- this.drawPlant(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.DiningTable) {
|
|
|
|
- this.drawDiningTable(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.DoubleBed) {
|
|
|
|
- this.drawDoubleBed(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.SingleBed) {
|
|
|
|
- this.drawSingleBed(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Wardrobe) {
|
|
|
|
- this.drawWardrobe(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Dresser) {
|
|
|
|
- this.drawDresser(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.BedsideCupboard) {
|
|
|
|
- this.drawBedsideCupboard(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Pillow) {
|
|
|
|
- this.drawPillow(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.GasStove) {
|
|
|
|
- this.drawGasStove(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Cupboard) {
|
|
|
|
- this.drawCupboard(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Bathtub) {
|
|
|
|
- this.drawBathtub(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Closestool) {
|
|
|
|
- this.drawClosestool(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Washstand) {
|
|
|
|
- this.drawWashstand(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Desk) {
|
|
|
|
- this.drawDesk(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.BalconyChair) {
|
|
|
|
- this.drawBalconyChair(geometry)
|
|
|
|
- } else if (geometry.geoType == VectorType.Elevator) {
|
|
|
|
- this.drawElevator(geometry)
|
|
|
|
- }
|
|
|
|
|
|
+ // if (geometry.geoType == VectorType.Cigaret) {
|
|
|
|
+ // this.drawCigaret(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.FirePoint) {
|
|
|
|
+ // this.drawFirePoint(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.SingleSofa) {
|
|
|
|
+ // this.drawSingleSofa(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.TeaTable) {
|
|
|
|
+ // this.drawTeaTable(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Carpet) {
|
|
|
|
+ // this.drawCarpet(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Plant) {
|
|
|
|
+ // this.drawPlant(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.DiningTable) {
|
|
|
|
+ // this.drawDiningTable(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.DoubleBed) {
|
|
|
|
+ // this.drawDoubleBed(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.SingleBed) {
|
|
|
|
+ // this.drawSingleBed(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Wardrobe) {
|
|
|
|
+ // this.drawWardrobe(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Dresser) {
|
|
|
|
+ // this.drawDresser(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.BedsideCupboard) {
|
|
|
|
+ // this.drawBedsideCupboard(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Pillow) {
|
|
|
|
+ // this.drawPillow(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.GasStove) {
|
|
|
|
+ // this.drawGasStove(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Cupboard) {
|
|
|
|
+ // this.drawCupboard(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Bathtub) {
|
|
|
|
+ // this.drawBathtub(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Closestool) {
|
|
|
|
+ // this.drawClosestool(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Washstand) {
|
|
|
|
+ // this.drawWashstand(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Desk) {
|
|
|
|
+ // this.drawDesk(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.BalconyChair) {
|
|
|
|
+ // this.drawBalconyChair(geometry)
|
|
|
|
+ // } else if (geometry.geoType == VectorType.Elevator) {
|
|
|
|
+ // this.drawElevator(geometry)
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|