default.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. const Road = {
  2. strokeStyle: "#939393",
  3. lineWidth: 8,
  4. realLineWidth: 2
  5. };
  6. const RoadEdge = {
  7. ...Road,
  8. lineWidth: 1,
  9. strokeStyle: "#000",
  10. };
  11. const Lane = {
  12. ...RoadEdge,
  13. lineWidth: 1,
  14. strokeStyle: "#000",
  15. dash: [8, 8],
  16. };
  17. const CurveRoad = {
  18. ...Road,
  19. lineWidth: 1,
  20. };
  21. const CurveRoadEdge = {
  22. ...CurveRoad,
  23. ...RoadEdge,
  24. };
  25. const CurveLan = {
  26. ...CurveRoad,
  27. ...Lane,
  28. };
  29. const Text = {
  30. strokeStyle: "rgb(0,0,0,1)",
  31. fillStyle: "rgb(0,0,0,1)",
  32. strokeStyle_adding: "rgba(243, 255, 0, 0.8)",
  33. fillStyle_adding: "rgba(243, 255, 0, 0.8)",
  34. lineWidth: 1,
  35. };
  36. const CanvasFont = {
  37. font: "14px Microsoft YaHei",
  38. fillStyle: "#000000",
  39. strokeStyle: "#000000",
  40. textAlign: "center",
  41. textBaseline: "middle",
  42. miterLimit: 10,
  43. direction: "ltr",
  44. };
  45. const Point = {
  46. strokeStyle: "#3290FF",
  47. fillStyle: "#fff",
  48. radius: 4,
  49. lineWidth: 4,
  50. };
  51. const RoadPoint = {
  52. ...Point,
  53. };
  54. const CurveRoadPoint = {
  55. ...Point,
  56. };
  57. const ControlPoint = {
  58. ...Point,
  59. strokeStyle: "#3290FF",
  60. radius: 8,
  61. };
  62. const Measure = {
  63. txt: "rgba(255,255,255,1)", //画墙/选墙的时候 测量值的颜色
  64. strokeStyle: "rgba(255,255,255,1)",
  65. lineWidth: 1,
  66. };
  67. const SimpleLine = {
  68. strokeStyle: "#CED806",
  69. lineWidth: 2,
  70. dash: [3, 2, 2],
  71. }
  72. const GuideLine = {
  73. strokeStyle: "#CED806",
  74. lineWidth: 2,
  75. dash: [3, 2, 2],
  76. }
  77. const MeasureLine = {
  78. strokeStyle: "#CED806",
  79. lineWidth: 2,
  80. }
  81. const BaseLine = {
  82. strokeStyle: "#3290FF",
  83. lineWidth: 2,
  84. }
  85. const Element = {
  86. AddingPoint: {
  87. radius: 4,
  88. fillStyle: "yellow",
  89. strokeStyle: "green",
  90. },
  91. NewRoad: {
  92. lineWidth: 4,
  93. strokeStyle: "rgba(100,100,100,0.3)",
  94. errorStrokeStyle: "rgb(250,63,72,0.3)",
  95. },
  96. CheckLinesX: {
  97. lineWidth: 2,
  98. strokeStyle: "#CED806",
  99. },
  100. CheckLinesY: {
  101. lineWidth: 2,
  102. strokeStyle: "#CED806",
  103. },
  104. VCheckLinesX: {
  105. lineWidth: 2,
  106. strokeStyle: "#CED806",
  107. //strokeStyle: 'rgba(100,149,237,0.5)',
  108. },
  109. VCheckLinesY: {
  110. lineWidth: 2,
  111. strokeStyle: "#CED806",
  112. //strokeStyle: 'rgba(100,149,237,0.5)',
  113. },
  114. };
  115. export default {
  116. SimpleLine,
  117. Road,
  118. CurveRoad,
  119. RoadEdge,
  120. CurveRoadEdge,
  121. Lane,
  122. CurveLan,
  123. Point,
  124. BaseLine,
  125. Text,
  126. ControlPoint,
  127. CurveRoadPoint,
  128. GuideLine,
  129. Font: CanvasFont,
  130. MeasureLine,
  131. Measure,
  132. Element,
  133. RoadPoint,
  134. bgColor: "#fff",
  135. };