@datagrok/helm 2.13.8 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/css/helm.css +40 -0
  3. package/dist/137.js +2 -0
  4. package/dist/137.js.map +1 -0
  5. package/dist/323.js +2 -0
  6. package/dist/323.js.map +1 -0
  7. package/dist/657.js +2 -0
  8. package/dist/657.js.map +1 -0
  9. package/dist/782.js +2 -0
  10. package/dist/782.js.map +1 -0
  11. package/dist/884.js +2 -0
  12. package/dist/884.js.map +1 -0
  13. package/dist/94.js +2 -0
  14. package/dist/94.js.map +1 -0
  15. package/dist/libraries_bio_src_monomer-works_seq-to-molfile-worker_ts.js +16420 -0
  16. package/dist/libraries_bio_src_monomer-works_seq-to-molfile-worker_ts.js.map +1 -0
  17. package/dist/package-test.js +1 -1
  18. package/dist/package-test.js.map +1 -1
  19. package/dist/package.js +1 -1
  20. package/dist/package.js.map +1 -1
  21. package/dist/vendors-HELM_node_modules_lru-cache_dist_esm_index_js.js +1560 -0
  22. package/dist/vendors-HELM_node_modules_lru-cache_dist_esm_index_js.js.map +1 -0
  23. package/files/samples/helm-showcase.csv +56 -0
  24. package/package.json +8 -12
  25. package/src/helm-helper.ts +134 -410
  26. package/src/package-api.ts +14 -11
  27. package/src/package-test.ts +0 -2
  28. package/src/package-utils.ts +8 -298
  29. package/src/package.g.ts +2 -8
  30. package/src/package.ts +11 -31
  31. package/src/tests/helm-activity-cliffs.ts +2 -2
  32. package/src/tests/helm-input-tests.ts +83 -0
  33. package/src/tests/parse-helm-tests.ts +7 -57
  34. package/src/tests/properties-widget-tests.ts +21 -11
  35. package/src/utils/helm-grid-cell-renderer.ts +141 -151
  36. package/src/utils/index.ts +3 -7
  37. package/src/widgets/helm-input.ts +42 -12
  38. package/src/widgets/properties-widget.ts +18 -11
  39. package/webpack.config.js +1 -12
  40. package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
  41. package/helm/JSDraw/ReadMe.txt +0 -8
  42. package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
  43. package/helm/dojo/package.ts +0 -41
  44. package/helm/dojo/types.ts +0 -12
  45. package/src/helm-web-editor.ts +0 -68
  46. package/src/tests/get-monomer-tests.ts +0 -214
  47. package/src/tests/helm-service-tests.ts +0 -98
  48. package/src/types/dojo.ts +0 -3
  49. package/src/types/index.ts +0 -5
  50. package/src/utils/get-monomer.ts +0 -90
  51. package/src/utils/helm-service.ts +0 -166
  52. package/test-console-output-1.log +0 -919
  53. package/test-record-1.mp4 +0 -0
  54. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +0 -63
  55. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +0 -116
  56. package/vendor/dojo-1.10.10/dijit/Destroyable.js +0 -35
  57. package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +0 -83
  58. package/vendor/dojo-1.10.10/dijit/Tooltip.js +0 -240
  59. package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +0 -612
  60. package/vendor/dojo-1.10.10/dijit/Viewport.js +0 -44
  61. package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +0 -87
  62. package/vendor/dojo-1.10.10/dijit/WidgetSet.js +0 -76
  63. package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +0 -247
  64. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +0 -94
  65. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +0 -238
  66. package/vendor/dojo-1.10.10/dijit/_Contained.js +0 -17
  67. package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +0 -56
  68. package/vendor/dojo-1.10.10/dijit/_Container.js +0 -47
  69. package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +0 -108
  70. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +0 -198
  71. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +0 -372
  72. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +0 -11
  73. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +0 -66
  74. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +0 -188
  75. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +0 -472
  76. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +0 -8
  77. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +0 -31
  78. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +0 -90
  79. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +0 -205
  80. package/vendor/dojo-1.10.10/dijit/_Widget.js +0 -66
  81. package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +0 -352
  82. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +0 -353
  83. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +0 -1200
  84. package/vendor/dojo-1.10.10/dijit/_base/focus.js +0 -68
  85. package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +0 -207
  86. package/vendor/dojo-1.10.10/dijit/_base/manager.js +0 -10
  87. package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +0 -35
  88. package/vendor/dojo-1.10.10/dijit/_base/place.js +0 -52
  89. package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +0 -131
  90. package/vendor/dojo-1.10.10/dijit/_base/popup.js +0 -23
  91. package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +0 -58
  92. package/vendor/dojo-1.10.10/dijit/_base/scroll.js +0 -6
  93. package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +0 -22
  94. package/vendor/dojo-1.10.10/dijit/_base/sniff.js +0 -3
  95. package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +0 -12
  96. package/vendor/dojo-1.10.10/dijit/_base/typematic.js +0 -3
  97. package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +0 -10
  98. package/vendor/dojo-1.10.10/dijit/_base/wai.js +0 -32
  99. package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +0 -109
  100. package/vendor/dojo-1.10.10/dijit/_base/window.js +0 -6
  101. package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +0 -18
  102. package/vendor/dojo-1.10.10/dijit/_base.js +0 -4
  103. package/vendor/dojo-1.10.10/dijit/_base.js.uncompressed.js +0 -27
  104. package/vendor/dojo-1.10.10/dijit/a11y.js +0 -109
  105. package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +0 -191
  106. package/vendor/dojo-1.10.10/dijit/a11yclick.js +0 -66
  107. package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +0 -139
  108. package/vendor/dojo-1.10.10/dijit/focus.js +0 -188
  109. package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +0 -371
  110. package/vendor/dojo-1.10.10/dijit/form/Button.js +0 -49
  111. package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +0 -130
  112. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +0 -4
  113. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +0 -27
  114. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +0 -21
  115. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +0 -86
  116. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +0 -38
  117. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +0 -102
  118. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +0 -7
  119. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +0 -26
  120. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +0 -50
  121. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +0 -116
  122. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +0 -26
  123. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +0 -81
  124. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +0 -24
  125. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +0 -51
  126. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +0 -22
  127. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +0 -67
  128. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +0 -111
  129. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +0 -254
  130. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +0 -32
  131. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +0 -69
  132. package/vendor/dojo-1.10.10/dijit/hccss.js +0 -9
  133. package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +0 -21
  134. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +0 -215
  135. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +0 -550
  136. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +0 -7
  137. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +0 -25
  138. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +0 -235
  139. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +0 -653
  140. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +0 -171
  141. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +0 -411
  142. package/vendor/dojo-1.10.10/dijit/layout/StackController.js +0 -194
  143. package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +0 -410
  144. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +0 -99
  145. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +0 -236
  146. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +0 -47
  147. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +0 -190
  148. package/vendor/dojo-1.10.10/dijit/layout/utils.js +0 -77
  149. package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +0 -151
  150. package/vendor/dojo-1.10.10/dijit/main.js +0 -4
  151. package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +0 -16
  152. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +0 -2
  153. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +0 -21
  154. package/vendor/dojo-1.10.10/dijit/nls/loading.js +0 -2
  155. package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +0 -47
  156. package/vendor/dojo-1.10.10/dijit/place.js +0 -142
  157. package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +0 -407
  158. package/vendor/dojo-1.10.10/dijit/popup.js +0 -162
  159. package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +0 -441
  160. package/vendor/dojo-1.10.10/dijit/registry.js +0 -79
  161. package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +0 -159
  162. package/vendor/dojo-1.10.10/dijit/selection.js +0 -364
  163. package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +0 -525
  164. package/vendor/dojo-1.10.10/dijit/typematic.js +0 -96
  165. package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +0 -211
  166. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +0 -195
  167. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +0 -761
  168. package/vendor/dojo-1.10.10/dojo/Stateful.js +0 -90
  169. package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +0 -218
  170. package/vendor/dojo-1.10.10/dojo/_base/url.js +0 -87
  171. package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +0 -109
  172. package/vendor/dojo-1.10.10/dojo/cache.js +0 -9
  173. package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +0 -7
  174. package/vendor/dojo-1.10.10/dojo/colors.js +0 -74
  175. package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +0 -232
  176. package/vendor/dojo-1.10.10/dojo/cookie.js +0 -48
  177. package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +0 -98
  178. package/vendor/dojo-1.10.10/dojo/date/stamp.js +0 -82
  179. package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +0 -144
  180. package/vendor/dojo-1.10.10/dojo/dojo.js +0 -7
  181. package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +0 -18680
  182. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +0 -27
  183. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +0 -101
  184. package/vendor/dojo-1.10.10/dojo/fx/easing.js +0 -165
  185. package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +0 -276
  186. package/vendor/dojo-1.10.10/dojo/fx.js +0 -271
  187. package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +0 -443
  188. package/vendor/dojo-1.10.10/dojo/hccss.js +0 -26
  189. package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +0 -52
  190. package/vendor/dojo-1.10.10/dojo/html.js +0 -161
  191. package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +0 -370
  192. package/vendor/dojo-1.10.10/dojo/io/iframe.js +0 -71
  193. package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +0 -190
  194. package/vendor/dojo-1.10.10/dojo/io/script.js +0 -112
  195. package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +0 -280
  196. package/vendor/dojo-1.10.10/dojo/parser.js +0 -437
  197. package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +0 -915
  198. package/vendor/dojo-1.10.10/dojo/promise/all.js +0 -59
  199. package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +0 -77
  200. package/vendor/dojo-1.10.10/dojo/regexp.js +0 -32
  201. package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +0 -70
  202. package/vendor/dojo-1.10.10/dojo/request/iframe.js +0 -291
  203. package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +0 -438
  204. package/vendor/dojo-1.10.10/dojo/request/script.js +0 -129
  205. package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +0 -237
  206. package/vendor/dojo-1.10.10/dojo/require.js +0 -11
  207. package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +0 -7
  208. package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
  209. package/vendor/dojo-1.10.10/dojo/string.js +0 -67
  210. package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +0 -181
  211. package/vendor/dojo-1.10.10/dojo/touch.js +0 -191
  212. package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +0 -468
  213. package/vendor/dojo-1.10.10/dojo/uacss.js +0 -36
  214. package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +0 -85
  215. package/vendor/dojo-1.10.10/dojo/window.js +0 -141
  216. package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +0 -241
  217. package/vendor/dojo-1.10.10/dojox/charting/Chart.js +0 -626
  218. package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +0 -1220
  219. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +0 -5
  220. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +0 -16
  221. package/vendor/dojo-1.10.10/dojox/charting/Element.js +0 -247
  222. package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +0 -402
  223. package/vendor/dojo-1.10.10/dojox/charting/Series.js +0 -24
  224. package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +0 -58
  225. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +0 -191
  226. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +0 -577
  227. package/vendor/dojo-1.10.10/dojox/charting/Theme.js +0 -42
  228. package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +0 -120
  229. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +0 -11
  230. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +0 -36
  231. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +0 -77
  232. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +0 -144
  233. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +0 -58
  234. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +0 -123
  235. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +0 -54
  236. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +0 -124
  237. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +0 -28
  238. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +0 -74
  239. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +0 -116
  240. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +0 -178
  241. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +0 -24
  242. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +0 -83
  243. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +0 -557
  244. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +0 -980
  245. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +0 -65
  246. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +0 -224
  247. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +0 -91
  248. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +0 -164
  249. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +0 -7
  250. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +0 -14
  251. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +0 -168
  252. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +0 -311
  253. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +0 -61
  254. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +0 -161
  255. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +0 -141
  256. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +0 -242
  257. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +0 -126
  258. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +0 -243
  259. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +0 -108
  260. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +0 -290
  261. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +0 -13
  262. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +0 -14
  263. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +0 -13
  264. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +0 -14
  265. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +0 -153
  266. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +0 -249
  267. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +0 -253
  268. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +0 -472
  269. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +0 -182
  270. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +0 -356
  271. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +0 -6
  272. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +0 -12
  273. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +0 -6
  274. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +0 -12
  275. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +0 -7
  276. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +0 -13
  277. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +0 -110
  278. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +0 -208
  279. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +0 -303
  280. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +0 -547
  281. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +0 -134
  282. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +0 -207
  283. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +0 -299
  284. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +0 -537
  285. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +0 -24
  286. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +0 -44
  287. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +0 -7
  288. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +0 -14
  289. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +0 -22
  290. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +0 -33
  291. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +0 -20
  292. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +0 -31
  293. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +0 -6
  294. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +0 -12
  295. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +0 -68
  296. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +0 -120
  297. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +0 -209
  298. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +0 -214
  299. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +0 -76
  300. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +0 -77
  301. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +0 -59
  302. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +0 -70
  303. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +0 -220
  304. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +0 -262
  305. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +0 -23
  306. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +0 -36
  307. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +0 -39
  308. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +0 -106
  309. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +0 -5
  310. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +0 -12
  311. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +0 -4
  312. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +0 -3
  313. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +0 -102
  314. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +0 -165
  315. package/vendor/dojo-1.10.10/dojox/color/Palette.js +0 -163
  316. package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +0 -460
  317. package/vendor/dojo-1.10.10/dojox/color/_base.js +0 -174
  318. package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +0 -196
  319. package/vendor/dojo-1.10.10/dojox/gfx/_base.js +0 -253
  320. package/vendor/dojo-1.10.10/dojox/gfx/_base.js.uncompressed.js +0 -1024
  321. package/vendor/dojo-1.10.10/dojox/gfx/fx.js +0 -297
  322. package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +0 -350
  323. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +0 -63
  324. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +0 -91
  325. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +0 -170
  326. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +0 -501
  327. package/vendor/dojo-1.10.10/dojox/gfx/path.js +0 -319
  328. package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +0 -478
  329. package/vendor/dojo-1.10.10/dojox/gfx/shape.js +0 -459
  330. package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +0 -1091
  331. package/vendor/dojo-1.10.10/dojox/gfx/svg.js +0 -662
  332. package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +0 -1023
  333. package/vendor/dojo-1.10.10/dojox/gfx/utils.js +0 -199
  334. package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +0 -322
  335. package/vendor/dojo-1.10.10/dojox/gfx.js +0 -2
  336. package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +0 -1136
  337. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +0 -151
  338. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +0 -169
  339. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +0 -93
  340. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +0 -125
  341. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +0 -81
  342. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +0 -132
  343. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +0 -54
  344. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +0 -78
  345. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +0 -61
  346. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +0 -77
  347. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +0 -87
  348. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +0 -107
  349. package/vendor/dojo-1.10.10/dojox/lang/functional.js +0 -4
  350. package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +0 -3
  351. package/vendor/dojo-1.10.10/dojox/lang/utils.js +0 -86
  352. package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +0 -121
  353. package/vendor/dojo-1.10.10/dojox/main.js +0 -4
  354. package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +0 -14
  355. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +0 -112
  356. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +0 -208
  357. package/vendor/dojo-1.10.10/dojox/storage/Provider.js +0 -62
  358. package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +0 -344
  359. package/vendor/dojo-1.10.10/dojox/storage/manager.js +0 -110
  360. package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +0 -263
@@ -1,1023 +0,0 @@
1
- define("dojox/gfx/svg", ["dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/dom", "dojo/_base/declare", "dojo/_base/array",
2
- "dojo/dom-geometry", "dojo/dom-attr", "dojo/_base/Color", "./_base", "./shape", "./path"],
3
- function(lang, has, win, dom, declare, arr, domGeom, domAttr, Color, g, gs, pathLib){
4
-
5
- var svg = g.svg = {
6
- // summary:
7
- // This the graphics rendering bridge for browsers compliant with W3C SVG1.0.
8
- // This is the preferred renderer to use for interactive and accessible graphics.
9
- };
10
- svg.useSvgWeb = (typeof window.svgweb != "undefined");
11
-
12
- // Need to detect iOS in order to workaround bug when
13
- // touching nodes with text
14
- var uagent = navigator.userAgent,
15
- safMobile = has("ios"),
16
- android = has("android"),
17
- textRenderingFix = has("chrome") || (android && android>=4) ? "auto" : "optimizeLegibility";// #16099, #16461
18
-
19
- function _createElementNS(ns, nodeType){
20
- // summary:
21
- // Internal helper to deal with creating elements that
22
- // are namespaced. Mainly to get SVG markup output
23
- // working on IE.
24
- if(win.doc.createElementNS){
25
- return win.doc.createElementNS(ns,nodeType);
26
- }else{
27
- return win.doc.createElement(nodeType);
28
- }
29
- }
30
-
31
- function _setAttributeNS(node, ns, attr, value){
32
- if(node.setAttributeNS){
33
- return node.setAttributeNS(ns, attr, value);
34
- }else{
35
- return node.setAttribute(attr, value);
36
- }
37
- }
38
-
39
- function _createTextNode(text){
40
- if(svg.useSvgWeb){
41
- return win.doc.createTextNode(text, true);
42
- }else{
43
- return win.doc.createTextNode(text);
44
- }
45
- }
46
-
47
- function _createFragment(){
48
- if(svg.useSvgWeb){
49
- return win.doc.createDocumentFragment(true);
50
- }else{
51
- return win.doc.createDocumentFragment();
52
- }
53
- }
54
-
55
- svg.xmlns = {
56
- xlink: "http://www.w3.org/1999/xlink",
57
- svg: "http://www.w3.org/2000/svg"
58
- };
59
-
60
- svg.getRef = function(name){
61
- // summary:
62
- // looks up a node by its external name
63
- // name: String
64
- // an SVG external reference
65
- // returns:
66
- // returns a DOM Node specified by the name argument or null
67
- if(!name || name == "none") return null;
68
- if(name.match(/^url\(#.+\)$/)){
69
- return dom.byId(name.slice(5, -1)); // Node
70
- }
71
- // alternative representation of a reference
72
- if(name.match(/^#dojoUnique\d+$/)){
73
- // we assume here that a reference was generated by dojox/gfx
74
- return dom.byId(name.slice(1)); // Node
75
- }
76
- return null; // Node
77
- };
78
-
79
- svg.dasharray = {
80
- solid: "none",
81
- shortdash: [4, 1],
82
- shortdot: [1, 1],
83
- shortdashdot: [4, 1, 1, 1],
84
- shortdashdotdot: [4, 1, 1, 1, 1, 1],
85
- dot: [1, 3],
86
- dash: [4, 3],
87
- longdash: [8, 3],
88
- dashdot: [4, 3, 1, 3],
89
- longdashdot: [8, 3, 1, 3],
90
- longdashdotdot: [8, 3, 1, 3, 1, 3]
91
- };
92
-
93
- var clipCount = 0;
94
-
95
- svg.Shape = declare("dojox.gfx.svg.Shape", gs.Shape, {
96
- // summary:
97
- // SVG-specific implementation of dojox/gfx/shape.Shape methods
98
-
99
- destroy: function(){
100
- if(this.fillStyle && "type" in this.fillStyle){
101
- var fill = this.rawNode.getAttribute("fill"),
102
- ref = svg.getRef(fill);
103
- if(ref){
104
- ref.parentNode.removeChild(ref);
105
- }
106
- }
107
- if(this.clip){
108
- var clipPathProp = this.rawNode.getAttribute("clip-path");
109
- if(clipPathProp){
110
- var clipNode = dom.byId(clipPathProp.match(/gfx_clip[\d]+/)[0]);
111
- if(clipNode){ clipNode.parentNode.removeChild(clipNode); }
112
- }
113
- }
114
- gs.Shape.prototype.destroy.apply(this, arguments);
115
- },
116
-
117
- setFill: function(fill){
118
- // summary:
119
- // sets a fill object (SVG)
120
- // fill: Object
121
- // a fill object
122
- // (see dojox/gfx.defaultLinearGradient,
123
- // dojox/gfx.defaultRadialGradient,
124
- // dojox/gfx.defaultPattern,
125
- // or dojo/_base/Color)
126
-
127
- if(!fill){
128
- // don't fill
129
- this.fillStyle = null;
130
- this.rawNode.setAttribute("fill", "none");
131
- this.rawNode.setAttribute("fill-opacity", 0);
132
- return this;
133
- }
134
- var f;
135
- // FIXME: slightly magical. We're using the outer scope's "f", but setting it later
136
- var setter = function(x){
137
- // we assume that we're executing in the scope of the node to mutate
138
- this.setAttribute(x, f[x].toFixed(8));
139
- };
140
- if(typeof(fill) == "object" && "type" in fill){
141
- // gradient
142
- switch(fill.type){
143
- case "linear":
144
- f = g.makeParameters(g.defaultLinearGradient, fill);
145
- var gradient = this._setFillObject(f, "linearGradient");
146
- arr.forEach(["x1", "y1", "x2", "y2"], setter, gradient);
147
- break;
148
- case "radial":
149
- f = g.makeParameters(g.defaultRadialGradient, fill);
150
- var grad = this._setFillObject(f, "radialGradient");
151
- arr.forEach(["cx", "cy", "r"], setter, grad);
152
- break;
153
- case "pattern":
154
- f = g.makeParameters(g.defaultPattern, fill);
155
- var pattern = this._setFillObject(f, "pattern");
156
- arr.forEach(["x", "y", "width", "height"], setter, pattern);
157
- break;
158
- }
159
- this.fillStyle = f;
160
- return this;
161
- }
162
- // color object
163
- f = g.normalizeColor(fill);
164
- this.fillStyle = f;
165
- this.rawNode.setAttribute("fill", f.toCss());
166
- this.rawNode.setAttribute("fill-opacity", f.a);
167
- this.rawNode.setAttribute("fill-rule", "evenodd");
168
- return this; // self
169
- },
170
-
171
- setStroke: function(stroke){
172
- // summary:
173
- // sets a stroke object (SVG)
174
- // stroke: Object
175
- // a stroke object (see dojox/gfx.defaultStroke)
176
-
177
- var rn = this.rawNode;
178
- if(!stroke){
179
- // don't stroke
180
- this.strokeStyle = null;
181
- rn.setAttribute("stroke", "none");
182
- rn.setAttribute("stroke-opacity", 0);
183
- return this;
184
- }
185
- // normalize the stroke
186
- if(typeof stroke == "string" || lang.isArray(stroke) || stroke instanceof Color){
187
- stroke = { color: stroke };
188
- }
189
- var s = this.strokeStyle = g.makeParameters(g.defaultStroke, stroke);
190
- s.color = g.normalizeColor(s.color);
191
- // generate attributes
192
- if(s){
193
- rn.setAttribute("stroke", s.color.toCss());
194
- rn.setAttribute("stroke-opacity", s.color.a);
195
- rn.setAttribute("stroke-width", s.width);
196
- rn.setAttribute("stroke-linecap", s.cap);
197
- if(typeof s.join == "number"){
198
- rn.setAttribute("stroke-linejoin", "miter");
199
- rn.setAttribute("stroke-miterlimit", s.join);
200
- }else{
201
- rn.setAttribute("stroke-linejoin", s.join);
202
- }
203
- var da = s.style.toLowerCase();
204
- if(da in svg.dasharray){
205
- da = svg.dasharray[da];
206
- }
207
- if(da instanceof Array){
208
- da = lang._toArray(da);
209
- var i;
210
- for(i = 0; i < da.length; ++i){
211
- da[i] *= s.width;
212
- }
213
- if(s.cap != "butt"){
214
- for(i = 0; i < da.length; i += 2){
215
- da[i] -= s.width;
216
- if(da[i] < 1){ da[i] = 1; }
217
- }
218
- for(i = 1; i < da.length; i += 2){
219
- da[i] += s.width;
220
- }
221
- }
222
- da = da.join(",");
223
- }
224
- rn.setAttribute("stroke-dasharray", da);
225
- rn.setAttribute("dojoGfxStrokeStyle", s.style);
226
- }
227
- return this; // self
228
- },
229
-
230
- _getParentSurface: function(){
231
- var surface = this.parent;
232
- for(; surface && !(surface instanceof g.Surface); surface = surface.parent);
233
- return surface;
234
- },
235
-
236
- _setFillObject: function(f, nodeType){
237
- var svgns = svg.xmlns.svg;
238
- this.fillStyle = f;
239
- var surface = this._getParentSurface(),
240
- defs = surface.defNode,
241
- fill = this.rawNode.getAttribute("fill"),
242
- ref = svg.getRef(fill);
243
- if(ref){
244
- fill = ref;
245
- if(fill.tagName.toLowerCase() != nodeType.toLowerCase()){
246
- var id = fill.id;
247
- fill.parentNode.removeChild(fill);
248
- fill = _createElementNS(svgns, nodeType);
249
- fill.setAttribute("id", id);
250
- defs.appendChild(fill);
251
- }else{
252
- while(fill.childNodes.length){
253
- fill.removeChild(fill.lastChild);
254
- }
255
- }
256
- }else{
257
- fill = _createElementNS(svgns, nodeType);
258
- fill.setAttribute("id", g._base._getUniqueId());
259
- defs.appendChild(fill);
260
- }
261
- if(nodeType == "pattern"){
262
- fill.setAttribute("patternUnits", "userSpaceOnUse");
263
- var img = _createElementNS(svgns, "image");
264
- img.setAttribute("x", 0);
265
- img.setAttribute("y", 0);
266
- img.setAttribute("width", f.width .toFixed(8));
267
- img.setAttribute("height", f.height.toFixed(8));
268
- _setAttributeNS(img, svg.xmlns.xlink, "xlink:href", f.src);
269
- fill.appendChild(img);
270
- }else{
271
- fill.setAttribute("gradientUnits", "userSpaceOnUse");
272
- for(var i = 0; i < f.colors.length; ++i){
273
- var c = f.colors[i], t = _createElementNS(svgns, "stop"),
274
- cc = c.color = g.normalizeColor(c.color);
275
- t.setAttribute("offset", c.offset.toFixed(8));
276
- t.setAttribute("stop-color", cc.toCss());
277
- t.setAttribute("stop-opacity", cc.a);
278
- fill.appendChild(t);
279
- }
280
- }
281
- this.rawNode.setAttribute("fill", "url(#" + fill.getAttribute("id") +")");
282
- this.rawNode.removeAttribute("fill-opacity");
283
- this.rawNode.setAttribute("fill-rule", "evenodd");
284
- return fill;
285
- },
286
-
287
- _applyTransform: function() {
288
- var matrix = this.matrix;
289
- if(matrix){
290
- var tm = this.matrix;
291
- this.rawNode.setAttribute("transform", "matrix(" +
292
- tm.xx.toFixed(8) + "," + tm.yx.toFixed(8) + "," +
293
- tm.xy.toFixed(8) + "," + tm.yy.toFixed(8) + "," +
294
- tm.dx.toFixed(8) + "," + tm.dy.toFixed(8) + ")");
295
- }else{
296
- this.rawNode.removeAttribute("transform");
297
- }
298
- return this;
299
- },
300
-
301
- setRawNode: function(rawNode){
302
- // summary:
303
- // assigns and clears the underlying node that will represent this
304
- // shape. Once set, transforms, gradients, etc, can be applied.
305
- // (no fill & stroke by default)
306
- var r = this.rawNode = rawNode;
307
- if(this.shape.type!="image"){
308
- r.setAttribute("fill", "none");
309
- }
310
- r.setAttribute("fill-opacity", 0);
311
- r.setAttribute("stroke", "none");
312
- r.setAttribute("stroke-opacity", 0);
313
- r.setAttribute("stroke-width", 1);
314
- r.setAttribute("stroke-linecap", "butt");
315
- r.setAttribute("stroke-linejoin", "miter");
316
- r.setAttribute("stroke-miterlimit", 4);
317
- // Bind GFX object with SVG node for ease of retrieval - that is to
318
- // save code/performance to keep this association elsewhere
319
- r.__gfxObject__ = this;
320
- },
321
-
322
- setShape: function(newShape){
323
- // summary:
324
- // sets a shape object (SVG)
325
- // newShape: Object
326
- // a shape object
327
- // (see dojox/gfx.defaultPath,
328
- // dojox/gfx.defaultPolyline,
329
- // dojox/gfx.defaultRect,
330
- // dojox/gfx.defaultEllipse,
331
- // dojox/gfx.defaultCircle,
332
- // dojox/gfx.defaultLine,
333
- // or dojox/gfx.defaultImage)
334
- this.shape = g.makeParameters(this.shape, newShape);
335
- for(var i in this.shape){
336
- if(i != "type"){
337
- this.rawNode.setAttribute(i, this.shape[i]);
338
- }
339
- }
340
- this.bbox = null;
341
- return this; // self
342
- },
343
-
344
- // move family
345
-
346
- _moveToFront: function(){
347
- // summary:
348
- // moves a shape to front of its parent's list of shapes (SVG)
349
- this.rawNode.parentNode.appendChild(this.rawNode);
350
- return this; // self
351
- },
352
- _moveToBack: function(){
353
- // summary:
354
- // moves a shape to back of its parent's list of shapes (SVG)
355
- this.rawNode.parentNode.insertBefore(this.rawNode, this.rawNode.parentNode.firstChild);
356
- return this; // self
357
- },
358
- setClip: function(clip){
359
- // summary:
360
- // sets the clipping area of this shape.
361
- // description:
362
- // This method overrides the dojox/gfx/shape.Shape.setClip() method.
363
- // clip: Object
364
- // an object that defines the clipping geometry, or null to remove clip.
365
- this.inherited(arguments);
366
- var clipType = clip ? "width" in clip ? "rect" :
367
- "cx" in clip ? "ellipse" :
368
- "points" in clip ? "polyline" : "d" in clip ? "path" : null : null;
369
- if(clip && !clipType){
370
- return this;
371
- }
372
- if(clipType === "polyline"){
373
- clip = lang.clone(clip);
374
- clip.points = clip.points.join(",");
375
- }
376
- var clipNode, clipShape,
377
- clipPathProp = domAttr.get(this.rawNode, "clip-path");
378
- if(clipPathProp){
379
- clipNode = dom.byId(clipPathProp.match(/gfx_clip[\d]+/)[0]);
380
- if(clipNode){ // may be null if not in the DOM anymore
381
- clipNode.removeChild(clipNode.childNodes[0]);
382
- }
383
- }
384
- if(clip){
385
- if(clipNode){
386
- clipShape = _createElementNS(svg.xmlns.svg, clipType);
387
- clipNode.appendChild(clipShape);
388
- }else{
389
- var idIndex = ++clipCount;
390
- var clipId = "gfx_clip" + idIndex;
391
- var clipUrl = "url(#" + clipId + ")";
392
- this.rawNode.setAttribute("clip-path", clipUrl);
393
- clipNode = _createElementNS(svg.xmlns.svg, "clipPath");
394
- clipShape = _createElementNS(svg.xmlns.svg, clipType);
395
- clipNode.appendChild(clipShape);
396
- this.rawNode.parentNode.insertBefore(clipNode, this.rawNode);
397
- domAttr.set(clipNode, "id", clipId);
398
- }
399
- domAttr.set(clipShape, clip);
400
- }else{
401
- //remove clip-path
402
- this.rawNode.removeAttribute("clip-path");
403
- if(clipNode){
404
- clipNode.parentNode.removeChild(clipNode);
405
- }
406
- }
407
- return this;
408
- },
409
- _removeClipNode: function(){
410
- var clipNode, clipPathProp = domAttr.get(this.rawNode, "clip-path");
411
- if(clipPathProp){
412
- clipNode = dom.byId(clipPathProp.match(/gfx_clip[\d]+/)[0]);
413
- if(clipNode){
414
- clipNode.parentNode.removeChild(clipNode);
415
- }
416
- }
417
- return clipNode;
418
- }
419
- });
420
-
421
-
422
- svg.Group = declare("dojox.gfx.svg.Group", svg.Shape, {
423
- // summary:
424
- // a group shape (SVG), which can be used
425
- // to logically group shapes (e.g, to propagate matricies)
426
- constructor: function(){
427
- gs.Container._init.call(this);
428
- },
429
- setRawNode: function(rawNode){
430
- // summary:
431
- // sets a raw SVG node to be used by this shape
432
- // rawNode: Node
433
- // an SVG node
434
- this.rawNode = rawNode;
435
- // Bind GFX object with SVG node for ease of retrieval - that is to
436
- // save code/performance to keep this association elsewhere
437
- this.rawNode.__gfxObject__ = this;
438
- },
439
- destroy: function(){
440
- // summary:
441
- // Releases all internal resources owned by this shape. Once this method has been called,
442
- // the instance is considered disposed and should not be used anymore.
443
- this.clear(true);
444
- // avoid this.inherited
445
- svg.Shape.prototype.destroy.apply(this, arguments);
446
- }
447
- });
448
- svg.Group.nodeType = "g";
449
-
450
- svg.Rect = declare("dojox.gfx.svg.Rect", [svg.Shape, gs.Rect], {
451
- // summary:
452
- // a rectangle shape (SVG)
453
- setShape: function(newShape){
454
- // summary:
455
- // sets a rectangle shape object (SVG)
456
- // newShape: Object
457
- // a rectangle shape object
458
- this.shape = g.makeParameters(this.shape, newShape);
459
- this.bbox = null;
460
- for(var i in this.shape){
461
- if(i != "type" && i != "r"){
462
- this.rawNode.setAttribute(i, this.shape[i]);
463
- }
464
- }
465
- if(this.shape.r != null){
466
- this.rawNode.setAttribute("ry", this.shape.r);
467
- this.rawNode.setAttribute("rx", this.shape.r);
468
- }
469
- return this; // self
470
- }
471
- });
472
- svg.Rect.nodeType = "rect";
473
-
474
- svg.Ellipse = declare("dojox.gfx.svg.Ellipse", [svg.Shape, gs.Ellipse], {});
475
- svg.Ellipse.nodeType = "ellipse";
476
-
477
- svg.Circle = declare("dojox.gfx.svg.Circle", [svg.Shape, gs.Circle], {});
478
- svg.Circle.nodeType = "circle";
479
-
480
- svg.Line = declare("dojox.gfx.svg.Line", [svg.Shape, gs.Line], {});
481
- svg.Line.nodeType = "line";
482
-
483
- svg.Polyline = declare("dojox.gfx.svg.Polyline", [svg.Shape, gs.Polyline], {
484
- // summary:
485
- // a polyline/polygon shape (SVG)
486
- setShape: function(points, closed){
487
- // summary:
488
- // sets a polyline/polygon shape object (SVG)
489
- // points: Object|Array
490
- // a polyline/polygon shape object, or an array of points
491
- if(points && points instanceof Array){
492
- this.shape = g.makeParameters(this.shape, { points: points });
493
- if(closed && this.shape.points.length){
494
- this.shape.points.push(this.shape.points[0]);
495
- }
496
- }else{
497
- this.shape = g.makeParameters(this.shape, points);
498
- }
499
- this.bbox = null;
500
- this._normalizePoints();
501
- var attr = [], p = this.shape.points;
502
- for(var i = 0; i < p.length; ++i){
503
- attr.push(p[i].x.toFixed(8), p[i].y.toFixed(8));
504
- }
505
- this.rawNode.setAttribute("points", attr.join(" "));
506
- return this; // self
507
- }
508
- });
509
- svg.Polyline.nodeType = "polyline";
510
-
511
- svg.Image = declare("dojox.gfx.svg.Image", [svg.Shape, gs.Image], {
512
- // summary:
513
- // an image (SVG)
514
- setShape: function(newShape){
515
- // summary:
516
- // sets an image shape object (SVG)
517
- // newShape: Object
518
- // an image shape object
519
- this.shape = g.makeParameters(this.shape, newShape);
520
- this.bbox = null;
521
- var rawNode = this.rawNode;
522
- for(var i in this.shape){
523
- if(i != "type" && i != "src"){
524
- rawNode.setAttribute(i, this.shape[i]);
525
- }
526
- }
527
- rawNode.setAttribute("preserveAspectRatio", "none");
528
- _setAttributeNS(rawNode, svg.xmlns.xlink, "xlink:href", this.shape.src);
529
- // Bind GFX object with SVG node for ease of retrieval - that is to
530
- // save code/performance to keep this association elsewhere
531
- rawNode.__gfxObject__ = this;
532
- return this; // self
533
- }
534
- });
535
- svg.Image.nodeType = "image";
536
-
537
- svg.Text = declare("dojox.gfx.svg.Text", [svg.Shape, gs.Text], {
538
- // summary:
539
- // an anchored text (SVG)
540
- setShape: function(newShape){
541
- // summary:
542
- // sets a text shape object (SVG)
543
- // newShape: Object
544
- // a text shape object
545
- this.shape = g.makeParameters(this.shape, newShape);
546
- this.bbox = null;
547
- var r = this.rawNode, s = this.shape;
548
- r.setAttribute("x", s.x);
549
- r.setAttribute("y", s.y);
550
- r.setAttribute("text-anchor", s.align);
551
- r.setAttribute("text-decoration", s.decoration);
552
- r.setAttribute("rotate", s.rotated ? 90 : 0);
553
- r.setAttribute("kerning", s.kerning ? "auto" : 0);
554
- r.setAttribute("text-rendering", textRenderingFix);
555
-
556
- // update the text content
557
- if(r.firstChild){
558
- r.firstChild.nodeValue = s.text;
559
- }else{
560
- r.appendChild(_createTextNode(s.text));
561
- }
562
- return this; // self
563
- },
564
- getTextWidth: function(){
565
- // summary:
566
- // get the text width in pixels
567
- var rawNode = this.rawNode,
568
- oldParent = rawNode.parentNode,
569
- _measurementNode = rawNode.cloneNode(true);
570
- _measurementNode.style.visibility = "hidden";
571
-
572
- // solution to the "orphan issue" in FF
573
- var _width = 0, _text = _measurementNode.firstChild.nodeValue;
574
- oldParent.appendChild(_measurementNode);
575
-
576
- // solution to the "orphan issue" in Opera
577
- // (nodeValue == "" hangs firefox)
578
- if(_text!=""){
579
- while(!_width){
580
- //Yang: work around svgweb bug 417 -- http://code.google.com/p/svgweb/issues/detail?id=417
581
- if (_measurementNode.getBBox)
582
- _width = parseInt(_measurementNode.getBBox().width);
583
- else
584
- _width = 68;
585
- }
586
- }
587
- oldParent.removeChild(_measurementNode);
588
- return _width;
589
- },
590
- getBoundingBox: function(){
591
- var s = this.getShape(), bbox = null;
592
- if(s.text){
593
- // try/catch the FF native getBBox error.
594
- try {
595
- bbox = this.rawNode.getBBox();
596
- } catch (e) {
597
- // under FF when the node is orphan (all other browsers return a 0ed bbox.
598
- bbox = {x:0, y:0, width:0, height:0};
599
- }
600
- }
601
- return bbox;
602
- }
603
- });
604
- svg.Text.nodeType = "text";
605
-
606
- svg.Path = declare("dojox.gfx.svg.Path", [svg.Shape, pathLib.Path], {
607
- // summary:
608
- // a path shape (SVG)
609
- _updateWithSegment: function(segment){
610
- // summary:
611
- // updates the bounding box of path with new segment
612
- // segment: Object
613
- // a segment
614
- this.inherited(arguments);
615
- if(typeof(this.shape.path) == "string"){
616
- this.rawNode.setAttribute("d", this.shape.path);
617
- }
618
- },
619
- setShape: function(newShape){
620
- // summary:
621
- // forms a path using a shape (SVG)
622
- // newShape: Object
623
- // an SVG path string or a path object (see dojox/gfx.defaultPath)
624
- this.inherited(arguments);
625
- if(this.shape.path){
626
- this.rawNode.setAttribute("d", this.shape.path);
627
- }else{
628
- this.rawNode.removeAttribute("d");
629
- }
630
- return this; // self
631
- }
632
- });
633
- svg.Path.nodeType = "path";
634
-
635
- svg.TextPath = declare("dojox.gfx.svg.TextPath", [svg.Shape, pathLib.TextPath], {
636
- // summary:
637
- // a textpath shape (SVG)
638
- _updateWithSegment: function(segment){
639
- // summary:
640
- // updates the bounding box of path with new segment
641
- // segment: Object
642
- // a segment
643
- this.inherited(arguments);
644
- this._setTextPath();
645
- },
646
- setShape: function(newShape){
647
- // summary:
648
- // forms a path using a shape (SVG)
649
- // newShape: Object
650
- // an SVG path string or a path object (see dojox/gfx.defaultPath)
651
- this.inherited(arguments);
652
- this._setTextPath();
653
- return this; // self
654
- },
655
- _setTextPath: function(){
656
- if(typeof this.shape.path != "string"){ return; }
657
- var r = this.rawNode;
658
- if(!r.firstChild){
659
- var tp = _createElementNS(svg.xmlns.svg, "textPath"),
660
- tx = _createTextNode("");
661
- tp.appendChild(tx);
662
- r.appendChild(tp);
663
- }
664
- var ref = r.firstChild.getAttributeNS(svg.xmlns.xlink, "href"),
665
- path = ref && svg.getRef(ref);
666
- if(!path){
667
- var surface = this._getParentSurface();
668
- if(surface){
669
- var defs = surface.defNode;
670
- path = _createElementNS(svg.xmlns.svg, "path");
671
- var id = g._base._getUniqueId();
672
- path.setAttribute("id", id);
673
- defs.appendChild(path);
674
- _setAttributeNS(r.firstChild, svg.xmlns.xlink, "xlink:href", "#" + id);
675
- }
676
- }
677
- if(path){
678
- path.setAttribute("d", this.shape.path);
679
- }
680
- },
681
- _setText: function(){
682
- var r = this.rawNode;
683
- if(!r.firstChild){
684
- var tp = _createElementNS(svg.xmlns.svg, "textPath"),
685
- tx = _createTextNode("");
686
- tp.appendChild(tx);
687
- r.appendChild(tp);
688
- }
689
- r = r.firstChild;
690
- var t = this.text;
691
- r.setAttribute("alignment-baseline", "middle");
692
- switch(t.align){
693
- case "middle":
694
- r.setAttribute("text-anchor", "middle");
695
- r.setAttribute("startOffset", "50%");
696
- break;
697
- case "end":
698
- r.setAttribute("text-anchor", "end");
699
- r.setAttribute("startOffset", "100%");
700
- break;
701
- default:
702
- r.setAttribute("text-anchor", "start");
703
- r.setAttribute("startOffset", "0%");
704
- break;
705
- }
706
- //r.parentNode.setAttribute("alignment-baseline", "central");
707
- //r.setAttribute("dominant-baseline", "central");
708
- r.setAttribute("baseline-shift", "0.5ex");
709
- r.setAttribute("text-decoration", t.decoration);
710
- r.setAttribute("rotate", t.rotated ? 90 : 0);
711
- r.setAttribute("kerning", t.kerning ? "auto" : 0);
712
- r.firstChild.data = t.text;
713
- }
714
- });
715
- svg.TextPath.nodeType = "text";
716
-
717
- // Fix for setDimension bug:
718
- // http://bugs.dojotoolkit.org/ticket/16100
719
- // (https://code.google.com/p/chromium/issues/detail?id=162628)
720
- var hasSvgSetAttributeBug = (function(){ var matches = /WebKit\/(\d*)/.exec(uagent); return matches ? matches[1] : 0})() > 534;
721
-
722
- svg.Surface = declare("dojox.gfx.svg.Surface", gs.Surface, {
723
- // summary:
724
- // a surface object to be used for drawings (SVG)
725
- constructor: function(){
726
- gs.Container._init.call(this);
727
- },
728
- destroy: function(){
729
- // no need to call svg.Container.clear to remove the children raw
730
- // nodes since the surface raw node will be removed. So, only dispose at gfx level
731
- gs.Container.clear.call(this, true);
732
- this.defNode = null; // release the external reference
733
- this.inherited(arguments);
734
- },
735
- setDimensions: function(width, height){
736
- // summary:
737
- // sets the width and height of the rawNode
738
- // width: String
739
- // width of surface, e.g., "100px"
740
- // height: String
741
- // height of surface, e.g., "100px"
742
- if(!this.rawNode){ return this; }
743
- this.rawNode.setAttribute("width", width);
744
- this.rawNode.setAttribute("height", height);
745
- if(hasSvgSetAttributeBug){
746
- this.rawNode.style.width = width;
747
- this.rawNode.style.height = height;
748
- }
749
- return this; // self
750
- },
751
- getDimensions: function(){
752
- // summary:
753
- // returns an object with properties "width" and "height"
754
- var t = this.rawNode ? {
755
- width: g.normalizedLength(this.rawNode.getAttribute("width")),
756
- height: g.normalizedLength(this.rawNode.getAttribute("height"))} : null;
757
- return t; // Object
758
- }
759
- });
760
-
761
- svg.createSurface = function(parentNode, width, height){
762
- // summary:
763
- // creates a surface (SVG)
764
- // parentNode: Node
765
- // a parent node
766
- // width: String|Number
767
- // width of surface, e.g., "100px" or 100
768
- // height: String|Number
769
- // height of surface, e.g., "100px" or 100
770
- // returns: dojox/gfx/shape.Surface
771
- // newly created surface
772
-
773
- var s = new svg.Surface();
774
- s.rawNode = _createElementNS(svg.xmlns.svg, "svg");
775
- s.rawNode.setAttribute("overflow", "hidden");
776
- if(width){
777
- s.rawNode.setAttribute("width", width);
778
- }
779
- if(height){
780
- s.rawNode.setAttribute("height", height);
781
- }
782
-
783
- var defNode = _createElementNS(svg.xmlns.svg, "defs");
784
- s.rawNode.appendChild(defNode);
785
- s.defNode = defNode;
786
-
787
- s._parent = dom.byId(parentNode);
788
- s._parent.appendChild(s.rawNode);
789
-
790
- g._base._fixMsTouchAction(s);
791
-
792
- return s; // dojox/gfx.Surface
793
- };
794
-
795
- // Extenders
796
-
797
- var Font = {
798
- _setFont: function(){
799
- // summary:
800
- // sets a font object (SVG)
801
- var f = this.fontStyle;
802
- // next line doesn't work in Firefox 2 or Opera 9
803
- //this.rawNode.setAttribute("font", dojox.gfx.makeFontString(this.fontStyle));
804
- this.rawNode.setAttribute("font-style", f.style);
805
- this.rawNode.setAttribute("font-variant", f.variant);
806
- this.rawNode.setAttribute("font-weight", f.weight);
807
- this.rawNode.setAttribute("font-size", f.size);
808
- this.rawNode.setAttribute("font-family", f.family);
809
- }
810
- };
811
-
812
- var C = gs.Container;
813
- var Container = svg.Container = {
814
- openBatch: function() {
815
- // summary:
816
- // starts a new batch, subsequent new child shapes will be held in
817
- // the batch instead of appending to the container directly
818
- if(!this._batch){
819
- this.fragment = _createFragment();
820
- }
821
- ++this._batch;
822
- return this;
823
- },
824
- closeBatch: function() {
825
- // summary:
826
- // submits the current batch, append all pending child shapes to DOM
827
- this._batch = this._batch > 0 ? --this._batch : 0;
828
- if (this.fragment && !this._batch) {
829
- this.rawNode.appendChild(this.fragment);
830
- delete this.fragment;
831
- }
832
- return this;
833
- },
834
- add: function(shape){
835
- // summary:
836
- // adds a shape to a group/surface
837
- // shape: dojox/gfx/shape.Shape
838
- // an VML shape object
839
- if(this != shape.getParent()){
840
- if (this.fragment) {
841
- this.fragment.appendChild(shape.rawNode);
842
- } else {
843
- this.rawNode.appendChild(shape.rawNode);
844
- }
845
- C.add.apply(this, arguments);
846
- // update clipnode with new parent
847
- shape.setClip(shape.clip);
848
- }
849
- return this; // self
850
- },
851
- remove: function(shape, silently){
852
- // summary:
853
- // remove a shape from a group/surface
854
- // shape: dojox/gfx/shape.Shape
855
- // an VML shape object
856
- // silently: Boolean?
857
- // if true, regenerate a picture
858
- if(this == shape.getParent()){
859
- if(this.rawNode == shape.rawNode.parentNode){
860
- this.rawNode.removeChild(shape.rawNode);
861
- }
862
- if(this.fragment && this.fragment == shape.rawNode.parentNode){
863
- this.fragment.removeChild(shape.rawNode);
864
- }
865
- // remove clip node from parent
866
- shape._removeClipNode();
867
- C.remove.apply(this, arguments);
868
- }
869
- return this; // self
870
- },
871
- clear: function(){
872
- // summary:
873
- // removes all shapes from a group/surface
874
- var r = this.rawNode;
875
- while(r.lastChild){
876
- r.removeChild(r.lastChild);
877
- }
878
- var defNode = this.defNode;
879
- if(defNode){
880
- while(defNode.lastChild){
881
- defNode.removeChild(defNode.lastChild);
882
- }
883
- r.appendChild(defNode);
884
- }
885
- return C.clear.apply(this, arguments);
886
- },
887
- getBoundingBox: C.getBoundingBox,
888
- _moveChildToFront: C._moveChildToFront,
889
- _moveChildToBack: C._moveChildToBack
890
- };
891
-
892
- var Creator = svg.Creator = {
893
- // summary:
894
- // SVG shape creators
895
- createObject: function(shapeType, rawShape){
896
- // summary:
897
- // creates an instance of the passed shapeType class
898
- // shapeType: Function
899
- // a class constructor to create an instance of
900
- // rawShape: Object
901
- // properties to be passed in to the classes "setShape" method
902
- if(!this.rawNode){ return null; }
903
- var shape = new shapeType(),
904
- node = _createElementNS(svg.xmlns.svg, shapeType.nodeType);
905
-
906
- shape.setRawNode(node);
907
- shape.setShape(rawShape);
908
- // rawNode.appendChild() will be done inside this.add(shape) below
909
- this.add(shape);
910
- return shape; // dojox/gfx/shape.Shape
911
- }
912
- };
913
-
914
- lang.extend(svg.Text, Font);
915
- lang.extend(svg.TextPath, Font);
916
-
917
- lang.extend(svg.Group, Container);
918
- lang.extend(svg.Group, gs.Creator);
919
- lang.extend(svg.Group, Creator);
920
-
921
- lang.extend(svg.Surface, Container);
922
- lang.extend(svg.Surface, gs.Creator);
923
- lang.extend(svg.Surface, Creator);
924
-
925
- // Mouse/Touch event
926
- svg.fixTarget = function(event, gfxElement) {
927
- // summary:
928
- // Adds the gfxElement to event.gfxTarget if none exists. This new
929
- // property will carry the GFX element associated with this event.
930
- // event: Object
931
- // The current input event (MouseEvent or TouchEvent)
932
- // gfxElement: Object
933
- // The GFX target element
934
- if (!event.gfxTarget) {
935
- if (safMobile && event.target.wholeText) {
936
- // Workaround iOS bug when touching text nodes
937
- event.gfxTarget = event.target.parentElement.__gfxObject__;
938
- } else {
939
- event.gfxTarget = event.target.__gfxObject__;
940
- }
941
- }
942
- return true;
943
- };
944
-
945
- // some specific override for svgweb + flash
946
- if(svg.useSvgWeb){
947
- // override createSurface()
948
- svg.createSurface = function(parentNode, width, height){
949
- var s = new svg.Surface();
950
-
951
- // ensure width / height
952
- if(!width || !height){
953
- var pos = domGeom.position(parentNode);
954
- width = width || pos.w;
955
- height = height || pos.h;
956
- }
957
-
958
- // ensure id
959
- parentNode = dom.byId(parentNode);
960
- var id = parentNode.id ? parentNode.id+'_svgweb' : g._base._getUniqueId();
961
-
962
- // create dynamic svg root
963
- var mockSvg = _createElementNS(svg.xmlns.svg, 'svg');
964
- mockSvg.id = id;
965
- mockSvg.setAttribute('width', width);
966
- mockSvg.setAttribute('height', height);
967
- svgweb.appendChild(mockSvg, parentNode);
968
-
969
- // notice: any call to the raw node before flash init will fail.
970
- mockSvg.addEventListener('SVGLoad', function(){
971
- // become loaded
972
- s.rawNode = this;
973
- s.isLoaded = true;
974
-
975
- // init defs
976
- var defNode = _createElementNS(svg.xmlns.svg, "defs");
977
- s.rawNode.appendChild(defNode);
978
- s.defNode = defNode;
979
-
980
- // notify application
981
- if (s.onLoad)
982
- s.onLoad(s);
983
- }, false);
984
-
985
- // flash not loaded yet
986
- s.isLoaded = false;
987
- return s;
988
- };
989
-
990
- // override Surface.destroy()
991
- svg.Surface.extend({
992
- destroy: function(){
993
- var mockSvg = this.rawNode;
994
- svgweb.removeChild(mockSvg, mockSvg.parentNode);
995
- }
996
- });
997
-
998
- // override connect() & disconnect() for Shape & Surface event processing
999
- var _eventsProcessing = {
1000
- connect: function(name, object, method){
1001
- // connect events using the mock addEventListener() provided by svgweb
1002
- if (name.substring(0, 2)==='on') { name = name.substring(2); }
1003
- if (arguments.length == 2) {
1004
- method = object;
1005
- } else {
1006
- method = lang.hitch(object, method);
1007
- }
1008
- this.getEventSource().addEventListener(name, method, false);
1009
- return [this, name, method];
1010
- },
1011
- disconnect: function(token){
1012
- // disconnect events using the mock removeEventListener() provided by svgweb
1013
- this.getEventSource().removeEventListener(token[1], token[2], false);
1014
- delete token[0];
1015
- }
1016
- };
1017
-
1018
- lang.extend(svg.Shape, _eventsProcessing);
1019
- lang.extend(svg.Surface, _eventsProcessing);
1020
- }
1021
-
1022
- return svg;
1023
- });