@datagrok/helm 2.13.7 → 3.0.0

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 (349) hide show
  1. package/CREDITS.md +164 -0
  2. package/dist/489.js +2 -0
  3. package/dist/489.js.map +1 -0
  4. package/dist/package-test.js +1 -1
  5. package/dist/package-test.js.map +1 -1
  6. package/dist/package.js +1 -1
  7. package/dist/package.js.map +1 -1
  8. package/files/samples/helm-showcase.csv +56 -0
  9. package/package.json +6 -10
  10. package/src/helm-helper.ts +61 -413
  11. package/src/package-api.ts +14 -11
  12. package/src/package-test.ts +0 -2
  13. package/src/package-utils.ts +8 -298
  14. package/src/package.g.ts +2 -8
  15. package/src/package.ts +11 -31
  16. package/src/tests/helm-activity-cliffs.ts +2 -2
  17. package/src/tests/helm-input-tests.ts +83 -0
  18. package/src/tests/parse-helm-tests.ts +7 -57
  19. package/src/tests/properties-widget-tests.ts +21 -11
  20. package/src/utils/helm-grid-cell-renderer.ts +141 -151
  21. package/src/utils/index.ts +3 -7
  22. package/src/widgets/helm-input.ts +42 -12
  23. package/src/widgets/properties-widget.ts +18 -11
  24. package/test-console-output-1.log +103 -706
  25. package/test-record-1.mp4 +0 -0
  26. package/webpack.config.js +1 -12
  27. package/dist/455.js +0 -2
  28. package/dist/455.js.map +0 -1
  29. package/dist/package-dojo.js +0 -2
  30. package/dist/package-dojo.js.map +0 -1
  31. package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
  32. package/helm/JSDraw/ReadMe.txt +0 -8
  33. package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
  34. package/helm/dojo/package.ts +0 -41
  35. package/helm/dojo/types.ts +0 -12
  36. package/src/helm-web-editor.ts +0 -68
  37. package/src/tests/get-monomer-tests.ts +0 -214
  38. package/src/tests/helm-service-tests.ts +0 -98
  39. package/src/types/dojo.ts +0 -3
  40. package/src/types/index.ts +0 -5
  41. package/src/utils/get-monomer.ts +0 -90
  42. package/src/utils/helm-service.ts +0 -166
  43. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +0 -63
  44. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +0 -116
  45. package/vendor/dojo-1.10.10/dijit/Destroyable.js +0 -35
  46. package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +0 -83
  47. package/vendor/dojo-1.10.10/dijit/Tooltip.js +0 -240
  48. package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +0 -612
  49. package/vendor/dojo-1.10.10/dijit/Viewport.js +0 -44
  50. package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +0 -87
  51. package/vendor/dojo-1.10.10/dijit/WidgetSet.js +0 -76
  52. package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +0 -247
  53. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +0 -94
  54. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +0 -238
  55. package/vendor/dojo-1.10.10/dijit/_Contained.js +0 -17
  56. package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +0 -56
  57. package/vendor/dojo-1.10.10/dijit/_Container.js +0 -47
  58. package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +0 -108
  59. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +0 -198
  60. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +0 -372
  61. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +0 -11
  62. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +0 -66
  63. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +0 -188
  64. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +0 -472
  65. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +0 -8
  66. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +0 -31
  67. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +0 -90
  68. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +0 -205
  69. package/vendor/dojo-1.10.10/dijit/_Widget.js +0 -66
  70. package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +0 -352
  71. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +0 -353
  72. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +0 -1200
  73. package/vendor/dojo-1.10.10/dijit/_base/focus.js +0 -68
  74. package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +0 -207
  75. package/vendor/dojo-1.10.10/dijit/_base/manager.js +0 -10
  76. package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +0 -35
  77. package/vendor/dojo-1.10.10/dijit/_base/place.js +0 -52
  78. package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +0 -131
  79. package/vendor/dojo-1.10.10/dijit/_base/popup.js +0 -23
  80. package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +0 -58
  81. package/vendor/dojo-1.10.10/dijit/_base/scroll.js +0 -6
  82. package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +0 -22
  83. package/vendor/dojo-1.10.10/dijit/_base/sniff.js +0 -3
  84. package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +0 -12
  85. package/vendor/dojo-1.10.10/dijit/_base/typematic.js +0 -3
  86. package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +0 -10
  87. package/vendor/dojo-1.10.10/dijit/_base/wai.js +0 -32
  88. package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +0 -109
  89. package/vendor/dojo-1.10.10/dijit/_base/window.js +0 -6
  90. package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +0 -18
  91. package/vendor/dojo-1.10.10/dijit/_base.js +0 -4
  92. package/vendor/dojo-1.10.10/dijit/_base.js.uncompressed.js +0 -27
  93. package/vendor/dojo-1.10.10/dijit/a11y.js +0 -109
  94. package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +0 -191
  95. package/vendor/dojo-1.10.10/dijit/a11yclick.js +0 -66
  96. package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +0 -139
  97. package/vendor/dojo-1.10.10/dijit/focus.js +0 -188
  98. package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +0 -371
  99. package/vendor/dojo-1.10.10/dijit/form/Button.js +0 -49
  100. package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +0 -130
  101. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +0 -4
  102. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +0 -27
  103. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +0 -21
  104. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +0 -86
  105. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +0 -38
  106. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +0 -102
  107. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +0 -7
  108. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +0 -26
  109. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +0 -50
  110. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +0 -116
  111. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +0 -26
  112. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +0 -81
  113. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +0 -24
  114. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +0 -51
  115. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +0 -22
  116. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +0 -67
  117. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +0 -111
  118. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +0 -254
  119. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +0 -32
  120. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +0 -69
  121. package/vendor/dojo-1.10.10/dijit/hccss.js +0 -9
  122. package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +0 -21
  123. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +0 -215
  124. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +0 -550
  125. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +0 -7
  126. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +0 -25
  127. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +0 -235
  128. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +0 -653
  129. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +0 -171
  130. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +0 -411
  131. package/vendor/dojo-1.10.10/dijit/layout/StackController.js +0 -194
  132. package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +0 -410
  133. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +0 -99
  134. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +0 -236
  135. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +0 -47
  136. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +0 -190
  137. package/vendor/dojo-1.10.10/dijit/layout/utils.js +0 -77
  138. package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +0 -151
  139. package/vendor/dojo-1.10.10/dijit/main.js +0 -4
  140. package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +0 -16
  141. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +0 -2
  142. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +0 -21
  143. package/vendor/dojo-1.10.10/dijit/nls/loading.js +0 -2
  144. package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +0 -47
  145. package/vendor/dojo-1.10.10/dijit/place.js +0 -142
  146. package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +0 -407
  147. package/vendor/dojo-1.10.10/dijit/popup.js +0 -162
  148. package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +0 -441
  149. package/vendor/dojo-1.10.10/dijit/registry.js +0 -79
  150. package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +0 -159
  151. package/vendor/dojo-1.10.10/dijit/selection.js +0 -364
  152. package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +0 -525
  153. package/vendor/dojo-1.10.10/dijit/typematic.js +0 -96
  154. package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +0 -211
  155. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +0 -195
  156. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +0 -761
  157. package/vendor/dojo-1.10.10/dojo/Stateful.js +0 -90
  158. package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +0 -218
  159. package/vendor/dojo-1.10.10/dojo/_base/url.js +0 -87
  160. package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +0 -109
  161. package/vendor/dojo-1.10.10/dojo/cache.js +0 -9
  162. package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +0 -7
  163. package/vendor/dojo-1.10.10/dojo/colors.js +0 -74
  164. package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +0 -232
  165. package/vendor/dojo-1.10.10/dojo/cookie.js +0 -48
  166. package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +0 -98
  167. package/vendor/dojo-1.10.10/dojo/date/stamp.js +0 -82
  168. package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +0 -144
  169. package/vendor/dojo-1.10.10/dojo/dojo.js +0 -7
  170. package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +0 -18680
  171. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +0 -27
  172. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +0 -101
  173. package/vendor/dojo-1.10.10/dojo/fx/easing.js +0 -165
  174. package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +0 -276
  175. package/vendor/dojo-1.10.10/dojo/fx.js +0 -271
  176. package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +0 -443
  177. package/vendor/dojo-1.10.10/dojo/hccss.js +0 -26
  178. package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +0 -52
  179. package/vendor/dojo-1.10.10/dojo/html.js +0 -161
  180. package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +0 -370
  181. package/vendor/dojo-1.10.10/dojo/io/iframe.js +0 -71
  182. package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +0 -190
  183. package/vendor/dojo-1.10.10/dojo/io/script.js +0 -112
  184. package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +0 -280
  185. package/vendor/dojo-1.10.10/dojo/parser.js +0 -437
  186. package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +0 -915
  187. package/vendor/dojo-1.10.10/dojo/promise/all.js +0 -59
  188. package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +0 -77
  189. package/vendor/dojo-1.10.10/dojo/regexp.js +0 -32
  190. package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +0 -70
  191. package/vendor/dojo-1.10.10/dojo/request/iframe.js +0 -291
  192. package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +0 -438
  193. package/vendor/dojo-1.10.10/dojo/request/script.js +0 -129
  194. package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +0 -237
  195. package/vendor/dojo-1.10.10/dojo/require.js +0 -11
  196. package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +0 -7
  197. package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
  198. package/vendor/dojo-1.10.10/dojo/string.js +0 -67
  199. package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +0 -181
  200. package/vendor/dojo-1.10.10/dojo/touch.js +0 -191
  201. package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +0 -468
  202. package/vendor/dojo-1.10.10/dojo/uacss.js +0 -36
  203. package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +0 -85
  204. package/vendor/dojo-1.10.10/dojo/window.js +0 -141
  205. package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +0 -241
  206. package/vendor/dojo-1.10.10/dojox/charting/Chart.js +0 -626
  207. package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +0 -1220
  208. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +0 -5
  209. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +0 -16
  210. package/vendor/dojo-1.10.10/dojox/charting/Element.js +0 -247
  211. package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +0 -402
  212. package/vendor/dojo-1.10.10/dojox/charting/Series.js +0 -24
  213. package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +0 -58
  214. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +0 -191
  215. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +0 -577
  216. package/vendor/dojo-1.10.10/dojox/charting/Theme.js +0 -42
  217. package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +0 -120
  218. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +0 -11
  219. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +0 -36
  220. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +0 -77
  221. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +0 -144
  222. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +0 -58
  223. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +0 -123
  224. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +0 -54
  225. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +0 -124
  226. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +0 -28
  227. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +0 -74
  228. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +0 -116
  229. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +0 -178
  230. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +0 -24
  231. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +0 -83
  232. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +0 -557
  233. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +0 -980
  234. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +0 -65
  235. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +0 -224
  236. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +0 -91
  237. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +0 -164
  238. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +0 -7
  239. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +0 -14
  240. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +0 -168
  241. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +0 -311
  242. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +0 -61
  243. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +0 -161
  244. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +0 -141
  245. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +0 -242
  246. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +0 -126
  247. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +0 -243
  248. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +0 -108
  249. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +0 -290
  250. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +0 -13
  251. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +0 -14
  252. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +0 -13
  253. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +0 -14
  254. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +0 -153
  255. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +0 -249
  256. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +0 -253
  257. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +0 -472
  258. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +0 -182
  259. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +0 -356
  260. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +0 -6
  261. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +0 -12
  262. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +0 -6
  263. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +0 -12
  264. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +0 -7
  265. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +0 -13
  266. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +0 -110
  267. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +0 -208
  268. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +0 -303
  269. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +0 -547
  270. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +0 -134
  271. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +0 -207
  272. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +0 -299
  273. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +0 -537
  274. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +0 -24
  275. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +0 -44
  276. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +0 -7
  277. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +0 -14
  278. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +0 -22
  279. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +0 -33
  280. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +0 -20
  281. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +0 -31
  282. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +0 -6
  283. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +0 -12
  284. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +0 -68
  285. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +0 -120
  286. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +0 -209
  287. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +0 -214
  288. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +0 -76
  289. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +0 -77
  290. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +0 -59
  291. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +0 -70
  292. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +0 -220
  293. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +0 -262
  294. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +0 -23
  295. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +0 -36
  296. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +0 -39
  297. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +0 -106
  298. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +0 -5
  299. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +0 -12
  300. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +0 -4
  301. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +0 -3
  302. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +0 -102
  303. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +0 -165
  304. package/vendor/dojo-1.10.10/dojox/color/Palette.js +0 -163
  305. package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +0 -460
  306. package/vendor/dojo-1.10.10/dojox/color/_base.js +0 -174
  307. package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +0 -196
  308. package/vendor/dojo-1.10.10/dojox/gfx/_base.js +0 -253
  309. package/vendor/dojo-1.10.10/dojox/gfx/_base.js.uncompressed.js +0 -1024
  310. package/vendor/dojo-1.10.10/dojox/gfx/fx.js +0 -297
  311. package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +0 -350
  312. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +0 -63
  313. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +0 -91
  314. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +0 -170
  315. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +0 -501
  316. package/vendor/dojo-1.10.10/dojox/gfx/path.js +0 -319
  317. package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +0 -478
  318. package/vendor/dojo-1.10.10/dojox/gfx/shape.js +0 -459
  319. package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +0 -1091
  320. package/vendor/dojo-1.10.10/dojox/gfx/svg.js +0 -662
  321. package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +0 -1023
  322. package/vendor/dojo-1.10.10/dojox/gfx/utils.js +0 -199
  323. package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +0 -322
  324. package/vendor/dojo-1.10.10/dojox/gfx.js +0 -2
  325. package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +0 -1136
  326. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +0 -151
  327. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +0 -169
  328. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +0 -93
  329. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +0 -125
  330. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +0 -81
  331. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +0 -132
  332. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +0 -54
  333. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +0 -78
  334. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +0 -61
  335. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +0 -77
  336. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +0 -87
  337. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +0 -107
  338. package/vendor/dojo-1.10.10/dojox/lang/functional.js +0 -4
  339. package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +0 -3
  340. package/vendor/dojo-1.10.10/dojox/lang/utils.js +0 -86
  341. package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +0 -121
  342. package/vendor/dojo-1.10.10/dojox/main.js +0 -4
  343. package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +0 -14
  344. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +0 -112
  345. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +0 -208
  346. package/vendor/dojo-1.10.10/dojox/storage/Provider.js +0 -62
  347. package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +0 -344
  348. package/vendor/dojo-1.10.10/dojox/storage/manager.js +0 -110
  349. package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +0 -263
@@ -1,1091 +0,0 @@
1
- define("dojox/gfx/shape", ["./_base", "dojo/_base/lang", "dojo/_base/declare", "dojo/_base/kernel", "dojo/_base/sniff",
2
- "dojo/on", "dojo/_base/array", "dojo/dom-construct", "dojo/_base/Color", "./matrix" ],
3
- function(g, lang, declare, kernel, has, on, arr, domConstruct, Color, matrixLib){
4
-
5
- function removeItemAt(a, index) {
6
- var len = (a.length - 1);
7
- while (index < len) {
8
- a[index] = a[++index];
9
- }
10
- a.length = len;
11
- }
12
-
13
- var shape = g.shape = {
14
- // summary:
15
- // This module contains the core graphics Shape API.
16
- // Different graphics renderer implementation modules (svg, canvas, vml, silverlight, etc.) extend this
17
- // basic api to provide renderer-specific implementations for each shape.
18
- };
19
-
20
- shape.Shape = declare("dojox.gfx.shape.Shape", null, {
21
- // summary:
22
- // a Shape object, which knows how to apply
23
- // graphical attributes and transformations
24
-
25
- constructor: function(){
26
- // rawNode: Node
27
- // underlying graphics-renderer-specific implementation object (if applicable)
28
- this.rawNode = null;
29
-
30
- // shape: Object
31
- // an abstract shape object
32
- // (see dojox/gfx.defaultPath,
33
- // dojox/gfx.defaultPolyline,
34
- // dojox/gfx.defaultRect,
35
- // dojox/gfx.defaultEllipse,
36
- // dojox/gfx.defaultCircle,
37
- // dojox/gfx.defaultLine,
38
- // or dojox/gfx.defaultImage)
39
- this.shape = null;
40
-
41
- // matrix: dojox/gfx/matrix.Matrix2D
42
- // a transformation matrix
43
- this.matrix = null;
44
-
45
- // fillStyle: dojox/gfx.Fill
46
- // a fill object
47
- // (see dojox/gfx.defaultLinearGradient,
48
- // dojox/gfx.defaultRadialGradient,
49
- // dojox/gfx.defaultPattern,
50
- // or dojo/Color)
51
- this.fillStyle = null;
52
-
53
- // strokeStyle: dojox/gfx.Stroke
54
- // a stroke object
55
- // (see dojox/gfx.defaultStroke)
56
- this.strokeStyle = null;
57
-
58
- // bbox: dojox/gfx.Rectangle
59
- // a bounding box of this shape
60
- // (see dojox/gfx.defaultRect)
61
- this.bbox = null;
62
-
63
- // virtual group structure
64
-
65
- // parent: Object
66
- // a parent or null
67
- // (see dojox/gfx/shape.Surface,
68
- // or dojox/gfx.Group)
69
- this.parent = null;
70
-
71
- // parentMatrix: dojox/gfx/matrix.Matrix2D
72
- // a transformation matrix inherited from the parent
73
- this.parentMatrix = null;
74
-
75
- if(has("gfxRegistry")){
76
- var uid = shape.register(this);
77
- this.getUID = function(){
78
- return uid;
79
- }
80
- }
81
- },
82
-
83
- destroy: function(){
84
- // summary:
85
- // Releases all internal resources owned by this shape. Once this method has been called,
86
- // the instance is considered destroyed and should not be used anymore.
87
- if(has("gfxRegistry")){
88
- shape.dispose(this);
89
- }
90
- if(this.rawNode && "__gfxObject__" in this.rawNode){
91
- this.rawNode.__gfxObject__ = null;
92
- }
93
- this.rawNode = null;
94
- },
95
-
96
- // trivial getters
97
-
98
- getNode: function(){
99
- // summary:
100
- // Different graphics rendering subsystems implement shapes in different ways. This
101
- // method provides access to the underlying graphics subsystem object. Clients calling this
102
- // method and using the return value must be careful not to try sharing or using the underlying node
103
- // in a general way across renderer implementation.
104
- // Returns the underlying graphics Node, or null if no underlying graphics node is used by this shape.
105
- return this.rawNode; // Node
106
- },
107
- getShape: function(){
108
- // summary:
109
- // returns the current Shape object or null
110
- // (see dojox/gfx.defaultPath,
111
- // dojox/gfx.defaultPolyline,
112
- // dojox/gfx.defaultRect,
113
- // dojox/gfx.defaultEllipse,
114
- // dojox/gfx.defaultCircle,
115
- // dojox/gfx.defaultLine,
116
- // or dojox/gfx.defaultImage)
117
- return this.shape; // Object
118
- },
119
- getTransform: function(){
120
- // summary:
121
- // Returns the current transformation matrix applied to this Shape or null
122
- return this.matrix; // dojox/gfx/matrix.Matrix2D
123
- },
124
- getFill: function(){
125
- // summary:
126
- // Returns the current fill object or null
127
- // (see dojox/gfx.defaultLinearGradient,
128
- // dojox/gfx.defaultRadialGradient,
129
- // dojox/gfx.defaultPattern,
130
- // or dojo/Color)
131
- return this.fillStyle; // Object
132
- },
133
- getStroke: function(){
134
- // summary:
135
- // Returns the current stroke object or null
136
- // (see dojox/gfx.defaultStroke)
137
- return this.strokeStyle; // Object
138
- },
139
- getParent: function(){
140
- // summary:
141
- // Returns the parent Shape, Group or null if this Shape is unparented.
142
- // (see dojox/gfx/shape.Surface,
143
- // or dojox/gfx.Group)
144
- return this.parent; // Object
145
- },
146
- getBoundingBox: function(){
147
- // summary:
148
- // Returns the bounding box Rectangle for this shape or null if a BoundingBox cannot be
149
- // calculated for the shape on the current renderer or for shapes with no geometric area (points).
150
- // A bounding box is a rectangular geometric region
151
- // defining the X and Y extent of the shape.
152
- // (see dojox/gfx.defaultRect)
153
- // Note that this method returns a direct reference to the attribute of this instance. Therefore you should
154
- // not modify its value directly but clone it instead.
155
- return this.bbox; // dojox/gfx.Rectangle
156
- },
157
- getTransformedBoundingBox: function(){
158
- // summary:
159
- // returns an array of four points or null
160
- // four points represent four corners of the untransformed bounding box
161
- var b = this.getBoundingBox();
162
- if(!b){
163
- return null; // null
164
- }
165
- var m = this._getRealMatrix(),
166
- gm = matrixLib;
167
- return [ // Array
168
- gm.multiplyPoint(m, b.x, b.y),
169
- gm.multiplyPoint(m, b.x + b.width, b.y),
170
- gm.multiplyPoint(m, b.x + b.width, b.y + b.height),
171
- gm.multiplyPoint(m, b.x, b.y + b.height)
172
- ];
173
- },
174
- getEventSource: function(){
175
- // summary:
176
- // returns a Node, which is used as
177
- // a source of events for this shape
178
-
179
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
180
- return this.rawNode; // Node
181
- },
182
-
183
- // empty settings
184
-
185
- setClip: function(clip){
186
- // summary:
187
- // sets the clipping area of this shape.
188
- // description:
189
- // The clipping area defines the shape area that will be effectively visible. Everything that
190
- // would be drawn outside of the clipping area will not be rendered.
191
- // The possible clipping area types are rectangle, ellipse, polyline and path, but all are not
192
- // supported by all the renderers. vml only supports rectangle clipping, while the gfx silverlight renderer does not
193
- // support path clipping.
194
- // The clip parameter defines the clipping area geometry, and should be an object with the following properties:
195
- //
196
- // - {x:Number, y:Number, width:Number, height:Number} for rectangular clip
197
- // - {cx:Number, cy:Number, rx:Number, ry:Number} for ellipse clip
198
- // - {points:Array} for polyline clip
199
- // - {d:String} for a path clip.
200
- //
201
- // The clip geometry coordinates are expressed in the coordinate system used to draw the shape. In other
202
- // words, the clipping area is defined in the shape parent coordinate system and the shape transform is automatically applied.
203
- // example:
204
- // The following example shows how to clip a gfx image with all the possible clip geometry: a rectangle,
205
- // an ellipse, a circle (using the ellipse geometry), a polyline and a path:
206
- //
207
- // | surface.createImage({src:img, width:200,height:200}).setClip({x:10,y:10,width:50,height:50});
208
- // | surface.createImage({src:img, x:100,y:50,width:200,height:200}).setClip({cx:200,cy:100,rx:20,ry:30});
209
- // | surface.createImage({src:img, x:0,y:350,width:200,height:200}).setClip({cx:100,cy:425,rx:60,ry:60});
210
- // | surface.createImage({src:img, x:300,y:0,width:200,height:200}).setClip({points:[350,0,450,50,380,130,300,110]});
211
- // | surface.createImage({src:img, x:300,y:350,width:200,height:200}).setClip({d:"M 350,350 C314,414 317,557 373,450.0000 z"});
212
-
213
- // clip: Object
214
- // an object that defines the clipping geometry, or null to remove clip.
215
-
216
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
217
- this.clip = clip;
218
- },
219
-
220
- getClip: function(){
221
- return this.clip;
222
- },
223
-
224
- setShape: function(shape){
225
- // summary:
226
- // sets a shape object
227
- // (the default implementation simply ignores it)
228
- // shape: Object
229
- // a shape object
230
- // (see dojox/gfx.defaultPath,
231
- // dojox/gfx.defaultPolyline,
232
- // dojox/gfx.defaultRect,
233
- // dojox/gfx.defaultEllipse,
234
- // dojox/gfx.defaultCircle,
235
- // dojox/gfx.defaultLine,
236
- // or dojox/gfx.defaultImage)
237
-
238
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
239
- this.shape = g.makeParameters(this.shape, shape);
240
- this.bbox = null;
241
- return this; // self
242
- },
243
- setFill: function(fill){
244
- // summary:
245
- // sets a fill object
246
- // (the default implementation simply ignores it)
247
- // fill: Object
248
- // a fill object
249
- // (see dojox/gfx.defaultLinearGradient,
250
- // dojox/gfx.defaultRadialGradient,
251
- // dojox/gfx.defaultPattern,
252
- // or dojo/_base/Color)
253
-
254
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
255
- if(!fill){
256
- // don't fill
257
- this.fillStyle = null;
258
- return this; // self
259
- }
260
- var f = null;
261
- if(typeof(fill) == "object" && "type" in fill){
262
- // gradient or pattern
263
- switch(fill.type){
264
- case "linear":
265
- f = g.makeParameters(g.defaultLinearGradient, fill);
266
- break;
267
- case "radial":
268
- f = g.makeParameters(g.defaultRadialGradient, fill);
269
- break;
270
- case "pattern":
271
- f = g.makeParameters(g.defaultPattern, fill);
272
- break;
273
- }
274
- }else{
275
- // color object
276
- f = g.normalizeColor(fill);
277
- }
278
- this.fillStyle = f;
279
- return this; // self
280
- },
281
- setStroke: function(stroke){
282
- // summary:
283
- // sets a stroke object
284
- // (the default implementation simply ignores it)
285
- // stroke: Object
286
- // a stroke object
287
- // (see dojox/gfx.defaultStroke)
288
-
289
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
290
- if(!stroke){
291
- // don't stroke
292
- this.strokeStyle = null;
293
- return this; // self
294
- }
295
- // normalize the stroke
296
- if(typeof stroke == "string" || lang.isArray(stroke) || stroke instanceof Color){
297
- stroke = {color: stroke};
298
- }
299
- var s = this.strokeStyle = g.makeParameters(g.defaultStroke, stroke);
300
- s.color = g.normalizeColor(s.color);
301
- return this; // self
302
- },
303
- setTransform: function(matrix){
304
- // summary:
305
- // sets a transformation matrix
306
- // matrix: dojox/gfx/matrix.Matrix2D
307
- // a matrix or a matrix-like object
308
- // (see an argument of dojox/gfx/matrix.Matrix2D
309
- // constructor for a list of acceptable arguments)
310
-
311
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
312
- this.matrix = matrixLib.clone(matrix ? matrixLib.normalize(matrix) : matrixLib.identity);
313
- return this._applyTransform(); // self
314
- },
315
-
316
- _applyTransform: function(){
317
- // summary:
318
- // physically sets a matrix
319
-
320
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
321
- return this; // self
322
- },
323
-
324
- // z-index
325
-
326
- moveToFront: function(){
327
- // summary:
328
- // moves a shape to front of its parent's list of shapes
329
- var p = this.getParent();
330
- if(p){
331
- p._moveChildToFront(this);
332
- this._moveToFront(); // execute renderer-specific action
333
- }
334
- return this; // self
335
- },
336
- moveToBack: function(){
337
- // summary:
338
- // moves a shape to back of its parent's list of shapes
339
- var p = this.getParent();
340
- if(p){
341
- p._moveChildToBack(this);
342
- this._moveToBack(); // execute renderer-specific action
343
- }
344
- return this;
345
- },
346
- _moveToFront: function(){
347
- // summary:
348
- // renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()
349
-
350
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
351
- },
352
- _moveToBack: function(){
353
- // summary:
354
- // renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()
355
-
356
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
357
- },
358
-
359
- // apply left & right transformation
360
-
361
- applyRightTransform: function(matrix){
362
- // summary:
363
- // multiplies the existing matrix with an argument on right side
364
- // (this.matrix * matrix)
365
- // matrix: dojox/gfx/matrix.Matrix2D
366
- // a matrix or a matrix-like object
367
- // (see an argument of dojox/gfx/matrix.Matrix2D
368
- // constructor for a list of acceptable arguments)
369
- return matrix ? this.setTransform([this.matrix, matrix]) : this; // self
370
- },
371
- applyLeftTransform: function(matrix){
372
- // summary:
373
- // multiplies the existing matrix with an argument on left side
374
- // (matrix * this.matrix)
375
- // matrix: dojox/gfx/matrix.Matrix2D
376
- // a matrix or a matrix-like object
377
- // (see an argument of dojox/gfx/matrix.Matrix2D
378
- // constructor for a list of acceptable arguments)
379
- return matrix ? this.setTransform([matrix, this.matrix]) : this; // self
380
- },
381
- applyTransform: function(matrix){
382
- // summary:
383
- // a shortcut for dojox/gfx/shape.Shape.applyRightTransform
384
- // matrix: dojox/gfx/matrix.Matrix2D
385
- // a matrix or a matrix-like object
386
- // (see an argument of dojox/gfx/matrix.Matrix2D
387
- // constructor for a list of acceptable arguments)
388
- return matrix ? this.setTransform([this.matrix, matrix]) : this; // self
389
- },
390
-
391
- // virtual group methods
392
-
393
- removeShape: function(silently){
394
- // summary:
395
- // removes the shape from its parent's list of shapes
396
- // silently: Boolean
397
- // if true, do not redraw a picture yet
398
- if(this.parent){
399
- this.parent.remove(this, silently);
400
- }
401
- return this; // self
402
- },
403
- _setParent: function(parent, matrix){
404
- // summary:
405
- // sets a parent
406
- // parent: Object
407
- // a parent or null
408
- // (see dojox/gfx/shape.Surface,
409
- // or dojox/gfx.Group)
410
- // matrix: dojox/gfx/matrix.Matrix2D
411
- // a 2D matrix or a matrix-like object
412
- this.parent = parent;
413
- return this._updateParentMatrix(matrix); // self
414
- },
415
- _updateParentMatrix: function(matrix){
416
- // summary:
417
- // updates the parent matrix with new matrix
418
- // matrix: dojox/gfx/Matrix2D
419
- // a 2D matrix or a matrix-like object
420
- this.parentMatrix = matrix ? matrixLib.clone(matrix) : null;
421
- return this._applyTransform(); // self
422
- },
423
- _getRealMatrix: function(){
424
- // summary:
425
- // returns the cumulative ('real') transformation matrix
426
- // by combining the shape's matrix with its parent's matrix
427
- var m = this.matrix;
428
- var p = this.parent;
429
- while(p){
430
- if(p.matrix){
431
- m = matrixLib.multiply(p.matrix, m);
432
- }
433
- p = p.parent;
434
- }
435
- return m; // dojox/gfx/matrix.Matrix2D
436
- }
437
- });
438
-
439
- shape._eventsProcessing = {
440
- on: function(type, listener){
441
- // summary:
442
- // Connects an event to this shape.
443
-
444
- return on(this.getEventSource(), type, shape.fixCallback(this, g.fixTarget, listener));
445
- },
446
-
447
- connect: function(name, object, method){
448
- // summary:
449
- // connects a handler to an event on this shape
450
-
451
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
452
- // redirect to fixCallback to normalize events and add the gfxTarget to the event. The latter
453
- // is done by dojox/gfx.fixTarget which is defined by each renderer
454
- if(name.substring(0, 2) == "on"){
455
- name = name.substring(2);
456
- }
457
- return this.on(name, method ? lang.hitch(object, method) : object);
458
- },
459
-
460
- disconnect: function(token){
461
- // summary:
462
- // connects a handler by token from an event on this shape
463
-
464
- // COULD BE RE-IMPLEMENTED BY THE RENDERER!
465
-
466
- return token.remove();
467
- }
468
- };
469
-
470
- shape.fixCallback = function(gfxElement, fixFunction, scope, method){
471
- // summary:
472
- // Wraps the callback to allow for tests and event normalization
473
- // before it gets invoked. This is where 'fixTarget' is invoked.
474
- // tags:
475
- // private
476
- // gfxElement: Object
477
- // The GFX object that triggers the action (ex.:
478
- // dojox/gfx.Surface and dojox/gfx/shape.Shape). A new event property
479
- // 'gfxTarget' is added to the event to reference this object.
480
- // for easy manipulation of GFX objects by the event handlers.
481
- // fixFunction: Function
482
- // The function that implements the logic to set the 'gfxTarget'
483
- // property to the event. It should be 'dojox/gfx.fixTarget' for
484
- // most of the cases
485
- // scope: Object
486
- // Optional. The scope to be used when invoking 'method'. If
487
- // omitted, a global scope is used.
488
- // method: Function|String
489
- // The original callback to be invoked.
490
- if(!method){
491
- method = scope;
492
- scope = null;
493
- }
494
- if(lang.isString(method)){
495
- scope = scope || kernel.global;
496
- if(!scope[method]){ throw(['dojox.gfx.shape.fixCallback: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
497
- return function(e){
498
- return fixFunction(e,gfxElement) ? scope[method].apply(scope, arguments || []) : undefined; }; // Function
499
- }
500
- return !scope
501
- ? function(e){
502
- return fixFunction(e,gfxElement) ? method.apply(scope, arguments) : undefined; }
503
- : function(e){
504
- return fixFunction(e,gfxElement) ? method.apply(scope, arguments || []) : undefined; }; // Function
505
- };
506
- lang.extend(shape.Shape, shape._eventsProcessing);
507
-
508
- shape.Container = {
509
- // summary:
510
- // a container of shapes, which can be used
511
- // as a foundation for renderer-specific groups, or as a way
512
- // to logically group shapes (e.g, to propagate matricies)
513
-
514
- _init: function() {
515
- // children: Array
516
- // a list of children
517
- this.children = [];
518
- this._batch = 0;
519
- },
520
-
521
- // group management
522
-
523
- openBatch: function() {
524
- // summary:
525
- // starts a new batch, subsequent new child shapes will be held in
526
- // the batch instead of appending to the container directly.
527
- // description:
528
- // Because the canvas renderer has no DOM hierarchy, the canvas implementation differs
529
- // such that it suspends the repaint requests for this container until the current batch is closed by a call to closeBatch().
530
- return this;
531
- },
532
- closeBatch: function() {
533
- // summary:
534
- // submits the current batch, append all pending child shapes to DOM
535
- // description:
536
- // On canvas, this method flushes the pending redraws queue.
537
- return this;
538
- },
539
- add: function(shape){
540
- // summary:
541
- // adds a shape to the list
542
- // shape: dojox/gfx/shape.Shape
543
- // the shape to add to the list
544
- var oldParent = shape.getParent();
545
- if(oldParent){
546
- oldParent.remove(shape, true);
547
- }
548
- this.children.push(shape);
549
- return shape._setParent(this, this._getRealMatrix()); // self
550
- },
551
- remove: function(shape, silently){
552
- // summary:
553
- // removes a shape from the list
554
- // shape: dojox/gfx/shape.Shape
555
- // the shape to remove
556
- // silently: Boolean
557
- // if true, do not redraw a picture yet
558
- for(var i = 0; i < this.children.length; ++i){
559
- if(this.children[i] == shape){
560
- if(silently){
561
- // skip for now
562
- }else{
563
- shape.parent = null;
564
- shape.parentMatrix = null;
565
- }
566
- removeItemAt(this.children, i);
567
- break;
568
- }
569
- }
570
- return this; // self
571
- },
572
- clear: function(/*Boolean?*/ destroy){
573
- // summary:
574
- // removes all shapes from a group/surface.
575
- // destroy: Boolean
576
- // Indicates whether the children should be destroyed. Optional.
577
- var shape;
578
- for(var i = 0; i < this.children.length;++i){
579
- shape = this.children[i];
580
- shape.parent = null;
581
- shape.parentMatrix = null;
582
- if(destroy){
583
- shape.destroy();
584
- }
585
- }
586
- this.children = [];
587
- return this; // self
588
- },
589
- getBoundingBox: function(){
590
- // summary:
591
- // Returns the bounding box Rectangle for this shape.
592
- if(this.children){
593
- // if this is a composite shape, then sum up all the children
594
- var result = null;
595
- arr.forEach(this.children, function(shape){
596
- var bb = shape.getBoundingBox();
597
- if(bb){
598
- var ct = shape.getTransform();
599
- if(ct){
600
- bb = matrixLib.multiplyRectangle(ct, bb);
601
- }
602
- if(result){
603
- // merge two bbox
604
- result.x = Math.min(result.x, bb.x);
605
- result.y = Math.min(result.y, bb.y);
606
- result.endX = Math.max(result.endX, bb.x + bb.width);
607
- result.endY = Math.max(result.endY, bb.y + bb.height);
608
- }else{
609
- // first bbox
610
- result = {
611
- x: bb.x,
612
- y: bb.y,
613
- endX: bb.x + bb.width,
614
- endY: bb.y + bb.height
615
- };
616
- }
617
- }
618
- });
619
- if(result){
620
- result.width = result.endX - result.x;
621
- result.height = result.endY - result.y;
622
- }
623
- return result; // dojox/gfx.Rectangle
624
- }
625
- // unknown/empty bounding box, subclass shall override this impl
626
- return null;
627
- },
628
- // moving child nodes
629
- _moveChildToFront: function(shape){
630
- // summary:
631
- // moves a shape to front of the list of shapes
632
- // shape: dojox/gfx/shape.Shape
633
- // one of the child shapes to move to the front
634
- for(var i = 0; i < this.children.length; ++i){
635
- if(this.children[i] == shape){
636
- removeItemAt(this.children, i);
637
- this.children.push(shape);
638
- break;
639
- }
640
- }
641
- return this; // self
642
- },
643
- _moveChildToBack: function(shape){
644
- // summary:
645
- // moves a shape to back of the list of shapes
646
- // shape: dojox/gfx/shape.Shape
647
- // one of the child shapes to move to the front
648
- for(var i = 0; i < this.children.length; ++i){
649
- if(this.children[i] == shape){
650
- removeItemAt(this.children, i);
651
- this.children.unshift(shape);
652
- break;
653
- }
654
- }
655
- return this; // self
656
- }
657
- };
658
-
659
- shape.Surface = declare("dojox.gfx.shape.Surface", null, {
660
- // summary:
661
- // a surface object to be used for drawings
662
- constructor: function(){
663
- // underlying node
664
- this.rawNode = null;
665
- // the parent node
666
- this._parent = null;
667
- // the list of DOM nodes to be deleted in the case of destruction
668
- this._nodes = [];
669
- // the list of events to be detached in the case of destruction
670
- this._events = [];
671
- },
672
- destroy: function(){
673
- // summary:
674
- // destroy all relevant external resources and release all
675
- // external references to make this object garbage-collectible
676
- arr.forEach(this._nodes, domConstruct.destroy);
677
- this._nodes = [];
678
- arr.forEach(this._events, function(h){ if(h){ h.remove(); } });
679
- this._events = [];
680
- this.rawNode = null; // recycle it in _nodes, if it needs to be recycled
681
- if(has("ie")){
682
- while(this._parent.lastChild){
683
- domConstruct.destroy(this._parent.lastChild);
684
- }
685
- }else{
686
- this._parent.innerHTML = "";
687
- }
688
- this._parent = null;
689
- },
690
- getEventSource: function(){
691
- // summary:
692
- // returns a node, which can be used to attach event listeners
693
- return this.rawNode; // Node
694
- },
695
- _getRealMatrix: function(){
696
- // summary:
697
- // always returns the identity matrix
698
- return null; // dojox/gfx/Matrix2D
699
- },
700
- /*=====
701
- setDimensions: function(width, height){
702
- // summary:
703
- // sets the width and height of the rawNode
704
- // width: String
705
- // width of surface, e.g., "100px"
706
- // height: String
707
- // height of surface, e.g., "100px"
708
- return this; // self
709
- },
710
- getDimensions: function(){
711
- // summary:
712
- // gets current width and height in pixels
713
- // returns: Object
714
- // object with properties "width" and "height"
715
- },
716
- =====*/
717
- isLoaded: true,
718
- onLoad: function(/*dojox/gfx/shape.Surface*/ surface){
719
- // summary:
720
- // local event, fired once when the surface is created
721
- // asynchronously, used only when isLoaded is false, required
722
- // only for Silverlight.
723
- },
724
- whenLoaded: function(/*Object|Null*/ context, /*Function|String*/ method){
725
- var f = lang.hitch(context, method);
726
- if(this.isLoaded){
727
- f(this);
728
- }else{
729
- on.once(this, "load", function(surface){
730
- f(surface);
731
- });
732
- }
733
- }
734
- });
735
- lang.extend(shape.Surface, shape._eventsProcessing);
736
-
737
- /*=====
738
- g.Point = declare("dojox/gfx.Point", null, {
739
- // summary:
740
- // 2D point for drawings - {x, y}
741
- // description:
742
- // Do not use this object directly!
743
- // Use the naked object instead: {x: 1, y: 2}.
744
- });
745
-
746
- g.Rectangle = declare("dojox.gfx.Rectangle", null, {
747
- // summary:
748
- // rectangle - {x, y, width, height}
749
- // description:
750
- // Do not use this object directly!
751
- // Use the naked object instead: {x: 1, y: 2, width: 100, height: 200}.
752
- });
753
- =====*/
754
-
755
-
756
- shape.Rect = declare("dojox.gfx.shape.Rect", shape.Shape, {
757
- // summary:
758
- // a generic rectangle
759
- constructor: function(rawNode){
760
- // rawNode: Node
761
- // The underlying graphics system object (typically a DOM Node)
762
- this.shape = g.getDefault("Rect");
763
- this.rawNode = rawNode;
764
- },
765
- getBoundingBox: function(){
766
- // summary:
767
- // returns the bounding box (its shape in this case)
768
- return this.shape; // dojox/gfx.Rectangle
769
- }
770
- });
771
-
772
- shape.Ellipse = declare("dojox.gfx.shape.Ellipse", shape.Shape, {
773
- // summary:
774
- // a generic ellipse
775
- constructor: function(rawNode){
776
- // rawNode: Node
777
- // a DOM Node
778
- this.shape = g.getDefault("Ellipse");
779
- this.rawNode = rawNode;
780
- },
781
- getBoundingBox: function(){
782
- // summary:
783
- // returns the bounding box
784
- if(!this.bbox){
785
- var shape = this.shape;
786
- this.bbox = {x: shape.cx - shape.rx, y: shape.cy - shape.ry,
787
- width: 2 * shape.rx, height: 2 * shape.ry};
788
- }
789
- return this.bbox; // dojox/gfx.Rectangle
790
- }
791
- });
792
-
793
- shape.Circle = declare("dojox.gfx.shape.Circle", shape.Shape, {
794
- // summary:
795
- // a generic circle
796
- constructor: function(rawNode){
797
- // rawNode: Node
798
- // a DOM Node
799
- this.shape = g.getDefault("Circle");
800
- this.rawNode = rawNode;
801
- },
802
- getBoundingBox: function(){
803
- // summary:
804
- // returns the bounding box
805
- if(!this.bbox){
806
- var shape = this.shape;
807
- this.bbox = {x: shape.cx - shape.r, y: shape.cy - shape.r,
808
- width: 2 * shape.r, height: 2 * shape.r};
809
- }
810
- return this.bbox; // dojox/gfx.Rectangle
811
- }
812
- });
813
-
814
- shape.Line = declare("dojox.gfx.shape.Line", shape.Shape, {
815
- // summary:
816
- // a generic line (do not instantiate it directly)
817
- constructor: function(rawNode){
818
- // rawNode: Node
819
- // a DOM Node
820
- this.shape = g.getDefault("Line");
821
- this.rawNode = rawNode;
822
- },
823
- getBoundingBox: function(){
824
- // summary:
825
- // returns the bounding box
826
- if(!this.bbox){
827
- var shape = this.shape;
828
- this.bbox = {
829
- x: Math.min(shape.x1, shape.x2),
830
- y: Math.min(shape.y1, shape.y2),
831
- width: Math.abs(shape.x2 - shape.x1),
832
- height: Math.abs(shape.y2 - shape.y1)
833
- };
834
- }
835
- return this.bbox; // dojox/gfx.Rectangle
836
- }
837
- });
838
-
839
- shape.Polyline = declare("dojox.gfx.shape.Polyline", shape.Shape, {
840
- // summary:
841
- // a generic polyline/polygon (do not instantiate it directly)
842
- constructor: function(rawNode){
843
- // rawNode: Node
844
- // a DOM Node
845
- this.shape = g.getDefault("Polyline");
846
- this.rawNode = rawNode;
847
- },
848
- setShape: function(points, closed){
849
- // summary:
850
- // sets a polyline/polygon shape object
851
- // points: Object|Array
852
- // a polyline/polygon shape object, or an array of points
853
- // closed: Boolean
854
- // close the polyline to make a polygon
855
- if(points && points instanceof Array){
856
- this.inherited(arguments, [{points: points}]);
857
- if(closed && this.shape.points.length){
858
- this.shape.points.push(this.shape.points[0]);
859
- }
860
- }else{
861
- this.inherited(arguments, [points]);
862
- }
863
- return this; // self
864
- },
865
- _normalizePoints: function(){
866
- // summary:
867
- // normalize points to array of {x:number, y:number}
868
- var p = this.shape.points, l = p && p.length;
869
- if(l && typeof p[0] == "number"){
870
- var points = [];
871
- for(var i = 0; i < l; i += 2){
872
- points.push({x: p[i], y: p[i + 1]});
873
- }
874
- this.shape.points = points;
875
- }
876
- },
877
- getBoundingBox: function(){
878
- // summary:
879
- // returns the bounding box
880
- if(!this.bbox && this.shape.points.length){
881
- var p = this.shape.points;
882
- var l = p.length;
883
- var t = p[0];
884
- var bbox = {l: t.x, t: t.y, r: t.x, b: t.y};
885
- for(var i = 1; i < l; ++i){
886
- t = p[i];
887
- if(bbox.l > t.x) bbox.l = t.x;
888
- if(bbox.r < t.x) bbox.r = t.x;
889
- if(bbox.t > t.y) bbox.t = t.y;
890
- if(bbox.b < t.y) bbox.b = t.y;
891
- }
892
- this.bbox = {
893
- x: bbox.l,
894
- y: bbox.t,
895
- width: bbox.r - bbox.l,
896
- height: bbox.b - bbox.t
897
- };
898
- }
899
- return this.bbox; // dojox/gfx.Rectangle
900
- }
901
- });
902
-
903
- shape.Image = declare("dojox.gfx.shape.Image", shape.Shape, {
904
- // summary:
905
- // a generic image (do not instantiate it directly)
906
- constructor: function(rawNode){
907
- // rawNode: Node
908
- // a DOM Node
909
- this.shape = g.getDefault("Image");
910
- this.rawNode = rawNode;
911
- },
912
- getBoundingBox: function(){
913
- // summary:
914
- // returns the bounding box (its shape in this case)
915
- return this.shape; // dojox/gfx.Rectangle
916
- },
917
- setStroke: function(){
918
- // summary:
919
- // ignore setting a stroke style
920
- return this; // self
921
- },
922
- setFill: function(){
923
- // summary:
924
- // ignore setting a fill style
925
- return this; // self
926
- }
927
- });
928
-
929
- shape.Text = declare(shape.Shape, {
930
- // summary:
931
- // a generic text (do not instantiate it directly)
932
- constructor: function(rawNode){
933
- // rawNode: Node
934
- // a DOM Node
935
- this.fontStyle = null;
936
- this.shape = g.getDefault("Text");
937
- this.rawNode = rawNode;
938
- },
939
- getFont: function(){
940
- // summary:
941
- // returns the current font object or null
942
- return this.fontStyle; // Object
943
- },
944
- setFont: function(newFont){
945
- // summary:
946
- // sets a font for text
947
- // newFont: Object
948
- // a font object (see dojox/gfx.defaultFont) or a font string
949
- this.fontStyle = typeof newFont == "string" ? g.splitFontString(newFont) :
950
- g.makeParameters(g.defaultFont, newFont);
951
- this._setFont();
952
- return this; // self
953
- },
954
- getBoundingBox: function(){
955
- var bbox = null, s = this.getShape();
956
- if(s.text){
957
- bbox = g._base._computeTextBoundingBox(this);
958
- }
959
- return bbox;
960
- }
961
- });
962
-
963
- shape.Creator = {
964
- // summary:
965
- // shape creators
966
- createShape: function(shape){
967
- // summary:
968
- // creates a shape object based on its type; it is meant to be used
969
- // by group-like objects
970
- // shape: Object
971
- // a shape descriptor object
972
- // returns: dojox/gfx/shape.Shape | Null
973
- // a fully instantiated surface-specific Shape object
974
- switch(shape.type){
975
- case g.defaultPath.type: return this.createPath(shape);
976
- case g.defaultRect.type: return this.createRect(shape);
977
- case g.defaultCircle.type: return this.createCircle(shape);
978
- case g.defaultEllipse.type: return this.createEllipse(shape);
979
- case g.defaultLine.type: return this.createLine(shape);
980
- case g.defaultPolyline.type: return this.createPolyline(shape);
981
- case g.defaultImage.type: return this.createImage(shape);
982
- case g.defaultText.type: return this.createText(shape);
983
- case g.defaultTextPath.type: return this.createTextPath(shape);
984
- }
985
- return null;
986
- },
987
- createGroup: function(){
988
- // summary:
989
- // creates a group shape
990
- return this.createObject(g.Group); // dojox/gfx/Group
991
- },
992
- createRect: function(rect){
993
- // summary:
994
- // creates a rectangle shape
995
- // rect: Object
996
- // a path object (see dojox/gfx.defaultRect)
997
- return this.createObject(g.Rect, rect); // dojox/gfx/shape.Rect
998
- },
999
- createEllipse: function(ellipse){
1000
- // summary:
1001
- // creates an ellipse shape
1002
- // ellipse: Object
1003
- // an ellipse object (see dojox/gfx.defaultEllipse)
1004
- return this.createObject(g.Ellipse, ellipse); // dojox/gfx/shape.Ellipse
1005
- },
1006
- createCircle: function(circle){
1007
- // summary:
1008
- // creates a circle shape
1009
- // circle: Object
1010
- // a circle object (see dojox/gfx.defaultCircle)
1011
- return this.createObject(g.Circle, circle); // dojox/gfx/shape.Circle
1012
- },
1013
- createLine: function(line){
1014
- // summary:
1015
- // creates a line shape
1016
- // line: Object
1017
- // a line object (see dojox/gfx.defaultLine)
1018
- return this.createObject(g.Line, line); // dojox/gfx/shape.Line
1019
- },
1020
- createPolyline: function(points){
1021
- // summary:
1022
- // creates a polyline/polygon shape
1023
- // points: Object
1024
- // a points object (see dojox/gfx.defaultPolyline)
1025
- // or an Array of points
1026
- return this.createObject(g.Polyline, points); // dojox/gfx/shape.Polyline
1027
- },
1028
- createImage: function(image){
1029
- // summary:
1030
- // creates a image shape
1031
- // image: Object
1032
- // an image object (see dojox/gfx.defaultImage)
1033
- return this.createObject(g.Image, image); // dojox/gfx/shape.Image
1034
- },
1035
- createText: function(text){
1036
- // summary:
1037
- // creates a text shape
1038
- // text: Object
1039
- // a text object (see dojox/gfx.defaultText)
1040
- return this.createObject(g.Text, text); // dojox/gfx/shape.Text
1041
- },
1042
- createPath: function(path){
1043
- // summary:
1044
- // creates a path shape
1045
- // path: Object
1046
- // a path object (see dojox/gfx.defaultPath)
1047
- return this.createObject(g.Path, path); // dojox/gfx/shape.Path
1048
- },
1049
- createTextPath: function(text){
1050
- // summary:
1051
- // creates a text shape
1052
- // text: Object
1053
- // a textpath object (see dojox/gfx.defaultTextPath)
1054
- return this.createObject(g.TextPath, {}).setText(text); // dojox/gfx/shape.TextPath
1055
- },
1056
- createObject: function(shapeType, rawShape){
1057
- // summary:
1058
- // creates an instance of the passed shapeType class
1059
- // shapeType: Function
1060
- // a class constructor to create an instance of
1061
- // rawShape: Object
1062
- // properties to be passed in to the classes 'setShape' method
1063
-
1064
- // SHOULD BE RE-IMPLEMENTED BY THE RENDERER!
1065
- return null; // dojox/gfx/shape.Shape
1066
- }
1067
- };
1068
-
1069
- /*=====
1070
- lang.extend(shape.Surface, shape.Container);
1071
- lang.extend(shape.Surface, shape.Creator);
1072
-
1073
- g.Group = declare(shape.Shape, {
1074
- // summary:
1075
- // a group shape, which can be used
1076
- // to logically group shapes (e.g, to propagate matricies)
1077
- });
1078
- lang.extend(g.Group, shape.Container);
1079
- lang.extend(g.Group, shape.Creator);
1080
-
1081
- g.Rect = shape.Rect;
1082
- g.Circle = shape.Circle;
1083
- g.Ellipse = shape.Ellipse;
1084
- g.Line = shape.Line;
1085
- g.Polyline = shape.Polyline;
1086
- g.Text = shape.Text;
1087
- g.Surface = shape.Surface;
1088
- =====*/
1089
-
1090
- return shape;
1091
- });