Style.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. var gridStyle = {
  2. strokeStyle: "#999999",
  3. f_fill: false,
  4. f_stroke: true,
  5. lineWidth: 1,
  6. globalAlpha: 0.3
  7. };
  8. var wallStyle = {
  9. fillStyle: "white",
  10. f_fill: true,
  11. f_stroke: true,
  12. globalAlpha: 1,
  13. globalCompositeOperation: "source-over",
  14. lineCap: "butt",
  15. lineJoin: "miter"
  16. };
  17. var measureStyle = {
  18. fillStyle: "#000000",
  19. font: "10px Arial",
  20. globalAlpha: 1,
  21. lineWidth: 1,
  22. textAlign: "start",
  23. textBaseline: "alphabetic",
  24. name: "measure"
  25. };
  26. //绿色
  27. //var selectlineStyle = {strokeStyle:"#89b808", f_fill:false,f_stroke:true, globalAlpha:1,lineWidth:5,globalCompositeOperation:"source-over",lineCap:"round"};
  28. var lineStyle = {
  29. strokeStyle: "#89b808",
  30. strokeStyle: "#89b808",
  31. f_fill: false,
  32. f_stroke: true,
  33. globalAlpha: 1,
  34. lineWidth: 5,
  35. globalCompositeOperation: "source-over",
  36. lineCap: "round"
  37. };
  38. //open门和窗户
  39. var openStyle = {
  40. strokeStyle: "#999999",
  41. f_fill: true,
  42. f_stroke: true,
  43. globalAlpha: 1,
  44. lineWidth: this.wallThickness,
  45. globalCompositeOperation: "source-over",
  46. lineCap: "butt",
  47. name: "open"
  48. };
  49. //simple门
  50. var simpleStyle = {
  51. strokeStyle: "#000000",
  52. fillStyle: "#EEEEEE",
  53. f_fill: true,
  54. f_stroke: true,
  55. globalAlpha: 0.5,
  56. lineWidth: 1,
  57. openLineWidth: this.wallThickness,
  58. globalCompositeOperation: "source-over",
  59. lineJoin: "miter",
  60. imageSmoothingEnabled: true,
  61. lineCap: "butt",
  62. name: "simple"
  63. };
  64. //BiFoldDoor
  65. var biFoldStyle = {
  66. strokeStyle: "#000000",
  67. fillStyle: "#EEEEEE",
  68. f_fill: true,
  69. f_stroke: true,
  70. globalAlpha: 0.5,
  71. lineWidth: 1,
  72. openLineWidth: this.wallThickness,
  73. globalCompositeOperation: "source-over",
  74. lineJoin: "miter",
  75. imageSmoothingEnabled: true,
  76. lineCap: "butt",
  77. name: "biFold"
  78. };
  79. //singleCasement窗
  80. var singleStyle = {
  81. strokeStyle: "#000000",
  82. fillStyle: "#EEEEEE",
  83. f_fill: true,
  84. f_stroke: true,
  85. globalAlpha: 0.5,
  86. lineWidth: 1,
  87. openLineWidth: this.wallThickness,
  88. globalCompositeOperation: "source-over",
  89. lineJoin: "miter",
  90. imageSmoothingEnabled: true,
  91. lineCap: "butt",
  92. name: "single"
  93. };
  94. //double窗
  95. var doubleStyle = {
  96. strokeStyle: "#000000",
  97. fillStyle: "#EEEEEE",
  98. f_fill: true,
  99. f_stroke: true,
  100. globalAlpha: 0.5,
  101. lineWidth: 1,
  102. openLineWidth: this.wallThickness,
  103. globalCompositeOperation: "source-over",
  104. lineJoin: "miter",
  105. imageSmoothingEnabled: true,
  106. lineCap: "butt",
  107. name: "double"
  108. };
  109. //slid门和窗户
  110. var slidingStyle = {
  111. strokeStyle: "#000000",
  112. fillStyle: "#EEEEEE",
  113. f_fill: true,
  114. f_stroke: true,
  115. globalAlpha: 0.5,
  116. lineWidth: 1,
  117. openLineWidth: this.wallThickness,
  118. globalCompositeOperation: "source-over",
  119. lineJoin: "miter",
  120. imageSmoothingEnabled: true,
  121. lineCap: "butt",
  122. name: "sliding"
  123. };
  124. //var doorStyle = {strokeStyle:"#89b808", f_fill:false,f_stroke:true, globalAlpha:1,lineWidth:this.wallThickness,globalCompositeOperation:"source-over"};
  125. //winder楼梯
  126. var winderStyle = {};
  127. var spiralStyle = {
  128. strokeStyle: "#999999",
  129. strokeStyle2: "#000000",
  130. fillStyle: "white",
  131. f_fill: true,
  132. f_stroke: true,
  133. lineWidth: 1,
  134. globalAlpha: 0.05,
  135. globalAlpha2: 1
  136. };
  137. //var selectdwpointStyle={fillColor:"#FAFAFA",strokeStyle:"#89b808", f_fill:true, f_stroke:true,globalAlpha:1,lineWidth:2,r:this.selectCircle_R};
  138. //选择的元素上的点的样式
  139. var selectCircleStyle = {
  140. fillStyle: "white",
  141. strokeStyle: "#89b808",
  142. f_fill: true,
  143. f_stroke: true,
  144. globalAlpha: 1,
  145. lineWidth: 2,
  146. r: this.selectCircle_R
  147. };
  148. var selectLineStyle = {
  149. strokeStyle: "#89b808",
  150. strokeStyle: "#89b808",
  151. f_fill: false,
  152. f_stroke: true,
  153. globalAlpha: 1,
  154. lineWidth: 5,
  155. globalCompositeOperation: "source-over",
  156. lineCap: "round"
  157. };
  158. //var selectdwlineStyle = {strokeStyle:"#777777", f_fill:false, f_stroke:true,lineWidth:1,globalAlpha:1,globalCompositeOperation:"source-over"};
  159. var circleStyle = {
  160. strokeStyle: "#89b808",
  161. strokeStyle: "#89b808",
  162. f_fill: false,
  163. f_stroke: true,
  164. fillOpacity: 1,
  165. strokeOpacity: 1,
  166. lineWidth: 5
  167. };
  168. var meterStyle = {
  169. strokeStyle: "black",
  170. f_fill: false,
  171. f_stroke: true,
  172. lineWidth: 1,
  173. globalAlpha: 1
  174. };
  175. var defaultStyle = {
  176. strokeStyle: "black",
  177. f_fill: false,
  178. f_stroke: true,
  179. lineWidth: 1,
  180. globalAlpha: 1,
  181. globalCompositeOperation: "source-over"
  182. };
  183. var pointStyle = {
  184. fillStyle: "#89b808",
  185. strokeStyle: "#89b808",
  186. f_fill: true,
  187. f_stroke: true,
  188. fillOpacity: 1,
  189. strokeOpacity: 1,
  190. linewidth: 1
  191. };
  192. var textStyle = {
  193. font: "10px Arial",
  194. fillStyle: "#000000",
  195. globalAlpha: 1
  196. };
  197. var addcontext = {
  198. fillStyle: 0,
  199. lineCap: 0,
  200. strokeStyle: 0,
  201. lineWidth: 0,
  202. globalAlpha: 0
  203. };
  204. var doorStyle = {
  205. strokeColor: "#89b808",
  206. f_fill: false,
  207. f_stroke: true,
  208. globalAlpha: 0.3,
  209. linewidth: this.wallThickness,
  210. globalCompositeOperation: "source-over",
  211. lineCap: "butt"
  212. };
  213. var doorStyle2 = {
  214. strokeColor: "#777777",
  215. f_fill: false,
  216. f_stroke: true,
  217. globalAlpha: 1,
  218. linewidth: this.wallThickness,
  219. globalCompositeOperation: "source-over",
  220. lineCap: "butt"
  221. };
  222. var slidingdoor = {
  223. strokeColor: "#aaaaaa",
  224. fillColor: "#770000",
  225. globalAlpha: 1,
  226. linewidth: this.wallThickness,
  227. globalCompositeOperation: "source-over",
  228. lineCap: "butt"
  229. };
  230. var doorPointStyle = {
  231. fillStyle: "#FAFAFA",
  232. strokeColor: "#89b808",
  233. f_fill: true,
  234. f_stroke: true,
  235. globalAlpha: 1,
  236. linewidth: 2,
  237. r: this.selectCircle_R
  238. };
  239. var doorlineStyle = {
  240. strokeColor: "#777777",
  241. f_fill: false,
  242. f_stroke: true,
  243. linewidth: 1,
  244. globalAlpha: 1,
  245. globalCompositeOperation: "source-over"
  246. };
  247. var sectorStyle = {
  248. fillStyle: "rgba(137, 137, 137, 0.5)",
  249. strokeStyle: "#89b808",
  250. lineWidth: 1,
  251. globalAlpha: 1,
  252. globalCompositeOperation: "source-over"
  253. };
  254. //var selectdwpointStyle={fillStyle:"#FFFFFF",strokeStyle:"#89b808", f_fill:true, f_stroke:true,globalAlpha:1,lineWidth:2,r:this.selectCircle_R};