xushiting 1 year ago
parent
commit
3928d1523f

+ 1 - 1
src/view/case/draw/board/editCAD/Geometry/Arrow.js

@@ -10,7 +10,7 @@ export default class Arrow extends Geometry {
         this.startPoint = startPoint
         this.endPoint = endPoint
         this.floor = floor?floor:0
-        this.color = 'black';
+        this.color = '#000000';
         this.geoType = VectorType.Arrow
         this.setId(vectorId)
     }

+ 1 - 1
src/view/case/draw/board/editCAD/Geometry/Circle.js

@@ -11,7 +11,7 @@ export default class Circle extends Geometry {
         this.radius = radius
         this.points = [];                       //顺时针
         this.setPoints()
-        this.color = 'black';
+        this.color = '#000000';
         this.floor = floor?floor:0
         this.geoType = VectorType.Circle
         this.setId(vectorId)

+ 1 - 1
src/view/case/draw/board/editCAD/Geometry/Rectangle.js

@@ -11,7 +11,7 @@ export default class Rectangle extends Geometry {
         this.floor = floor?floor:0
         this.angle = 0;
         this.setPoints(leftTopPosition,rightDownPosition)
-        this.color = 'black';
+        this.color = '#000000';
         this.geoType = VectorType.Rectangle
         this.setId(vectorId)
     }

+ 1 - 1
src/view/case/draw/board/editCAD/Geometry/Tag.js

@@ -15,7 +15,7 @@ export default class Tag extends Geometry {
         this.sideWidth = 30 //像素
         this.sideThickness = 30 //像素
 
-        this.color = 'black';
+        this.color = '#000000';
         this.fontSize = 12;
 
         this.geoType = VectorType.Tag

+ 1 - 1
src/view/case/draw/board/editCAD/Geometry/Wall.js

@@ -7,7 +7,7 @@ export default class Wall extends Geometry {
         this.start = pointId1
         this.end = pointId2
         this.floor = floor?floor:0
-        this.color = 'black';
+        this.color = '#000000';
         this.geoType = VectorType.Wall
         this.setId(vectorId)
     }

+ 1 - 1
src/view/case/draw/board/editCAD/History/HistoryUtil.js

@@ -14,7 +14,7 @@ export default class HistoryUtil {
     constructor() {}
 
     isDifferentForWalls(wall1, wall2) {
-        if (wall1.start == wall2.start && wall1.end == wall2.end) {
+        if (wall1.start == wall2.start && wall1.end == wall2.end && wall1.color == wall2.color) {
             return false
         } else {
             return true

+ 1 - 0
src/view/case/draw/board/editCAD/Service/ArrowService.js

@@ -24,6 +24,7 @@ export default class ArrowService {
         arrow.vectorId = arrowInfo.vectorId
         arrow.startPoint = JSON.parse(JSON.stringify(arrowInfo.startPoint))
         arrow.endPoint = JSON.parse(JSON.stringify(arrowInfo.endPoint))
+        arrow.color = arrowInfo.color
     }
 
     deleteArrow(arrowId, floorNum) {

+ 1 - 0
src/view/case/draw/board/editCAD/Service/CircleService.js

@@ -36,6 +36,7 @@ export default class CircleService {
         circle.radius = circleInfo.radius
         circle.center = JSON.parse(JSON.stringify(circleInfo.center))
         circle.points = JSON.parse(JSON.stringify(circleInfo.points))
+        circle.color = circleInfo.color
     }
 
     deleteCircle(circleId, floorNum) {

+ 1 - 0
src/view/case/draw/board/editCAD/Service/RectangleService.js

@@ -22,6 +22,7 @@ export default class RectangleService {
         let rectangle = floorplanService.getRectangle(rectangleInfo.vectorId)
         rectangle.vectorId = rectangleInfo.vectorId
         rectangle.angle = rectangleInfo.angle
+        rectangle.color = rectangleInfo.color
         rectangle.points = JSON.parse(JSON.stringify(rectangleInfo.points))
     }
 

+ 2 - 0
src/view/case/draw/board/editCAD/Service/TagService.js

@@ -20,6 +20,8 @@ export default class TagService {
         tag.center = JSON.parse(JSON.stringify(tagInfo.center))
         tag.points2d = JSON.parse(JSON.stringify(tagInfo.points2d))
         tag.value = tagInfo.value
+        tag.color = tagInfo.color
+        tag.fontSize = tagInfo.fontSize
     }
 
     deleteTag(tagId, floorNum) {

+ 1 - 0
src/view/case/draw/board/editCAD/Service/WallService.js

@@ -557,6 +557,7 @@ export class WallService {
         let wall = floorplanService.getWall(wallInfo.vectorId)
         wall.start = wallInfo.start
         wall.end = wallInfo.end
+        wall.color = wallInfo.color
         return wall
     }