@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.
- package/CREDITS.md +164 -0
- package/dist/489.js +2 -0
- package/dist/489.js.map +1 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/files/samples/helm-showcase.csv +56 -0
- package/package.json +6 -10
- package/src/helm-helper.ts +61 -413
- package/src/package-api.ts +14 -11
- package/src/package-test.ts +0 -2
- package/src/package-utils.ts +8 -298
- package/src/package.g.ts +2 -8
- package/src/package.ts +11 -31
- package/src/tests/helm-activity-cliffs.ts +2 -2
- package/src/tests/helm-input-tests.ts +83 -0
- package/src/tests/parse-helm-tests.ts +7 -57
- package/src/tests/properties-widget-tests.ts +21 -11
- package/src/utils/helm-grid-cell-renderer.ts +141 -151
- package/src/utils/index.ts +3 -7
- package/src/widgets/helm-input.ts +42 -12
- package/src/widgets/properties-widget.ts +18 -11
- package/test-console-output-1.log +103 -706
- package/test-record-1.mp4 +0 -0
- package/webpack.config.js +1 -12
- package/dist/455.js +0 -2
- package/dist/455.js.map +0 -1
- package/dist/package-dojo.js +0 -2
- package/dist/package-dojo.js.map +0 -1
- package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
- package/helm/JSDraw/ReadMe.txt +0 -8
- package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
- package/helm/dojo/package.ts +0 -41
- package/helm/dojo/types.ts +0 -12
- package/src/helm-web-editor.ts +0 -68
- package/src/tests/get-monomer-tests.ts +0 -214
- package/src/tests/helm-service-tests.ts +0 -98
- package/src/types/dojo.ts +0 -3
- package/src/types/index.ts +0 -5
- package/src/utils/get-monomer.ts +0 -90
- package/src/utils/helm-service.ts +0 -166
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +0 -63
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +0 -116
- package/vendor/dojo-1.10.10/dijit/Destroyable.js +0 -35
- package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +0 -83
- package/vendor/dojo-1.10.10/dijit/Tooltip.js +0 -240
- package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +0 -612
- package/vendor/dojo-1.10.10/dijit/Viewport.js +0 -44
- package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +0 -87
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js +0 -76
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +0 -247
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +0 -94
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +0 -238
- package/vendor/dojo-1.10.10/dijit/_Contained.js +0 -17
- package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +0 -56
- package/vendor/dojo-1.10.10/dijit/_Container.js +0 -47
- package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +0 -108
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +0 -198
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +0 -372
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +0 -11
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +0 -66
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +0 -188
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +0 -472
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +0 -8
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +0 -31
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +0 -90
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +0 -205
- package/vendor/dojo-1.10.10/dijit/_Widget.js +0 -66
- package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +0 -352
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +0 -353
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +0 -1200
- package/vendor/dojo-1.10.10/dijit/_base/focus.js +0 -68
- package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +0 -207
- package/vendor/dojo-1.10.10/dijit/_base/manager.js +0 -10
- package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +0 -35
- package/vendor/dojo-1.10.10/dijit/_base/place.js +0 -52
- package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +0 -131
- package/vendor/dojo-1.10.10/dijit/_base/popup.js +0 -23
- package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +0 -58
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js +0 -6
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +0 -22
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js +0 -3
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js +0 -3
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +0 -10
- package/vendor/dojo-1.10.10/dijit/_base/wai.js +0 -32
- package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +0 -109
- package/vendor/dojo-1.10.10/dijit/_base/window.js +0 -6
- package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +0 -18
- package/vendor/dojo-1.10.10/dijit/_base.js +0 -4
- package/vendor/dojo-1.10.10/dijit/_base.js.uncompressed.js +0 -27
- package/vendor/dojo-1.10.10/dijit/a11y.js +0 -109
- package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +0 -191
- package/vendor/dojo-1.10.10/dijit/a11yclick.js +0 -66
- package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +0 -139
- package/vendor/dojo-1.10.10/dijit/focus.js +0 -188
- package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +0 -371
- package/vendor/dojo-1.10.10/dijit/form/Button.js +0 -49
- package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +0 -130
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +0 -4
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +0 -27
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +0 -21
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +0 -86
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +0 -38
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +0 -102
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +0 -7
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +0 -26
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +0 -50
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +0 -116
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +0 -26
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +0 -81
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +0 -24
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +0 -51
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +0 -22
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +0 -67
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +0 -111
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +0 -254
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +0 -32
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +0 -69
- package/vendor/dojo-1.10.10/dijit/hccss.js +0 -9
- package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +0 -21
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +0 -215
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +0 -550
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +0 -7
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +0 -25
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +0 -235
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +0 -653
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +0 -171
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +0 -411
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js +0 -194
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +0 -410
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +0 -99
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +0 -236
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +0 -47
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +0 -190
- package/vendor/dojo-1.10.10/dijit/layout/utils.js +0 -77
- package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +0 -151
- package/vendor/dojo-1.10.10/dijit/main.js +0 -4
- package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +0 -16
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +0 -2
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +0 -21
- package/vendor/dojo-1.10.10/dijit/nls/loading.js +0 -2
- package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +0 -47
- package/vendor/dojo-1.10.10/dijit/place.js +0 -142
- package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +0 -407
- package/vendor/dojo-1.10.10/dijit/popup.js +0 -162
- package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +0 -441
- package/vendor/dojo-1.10.10/dijit/registry.js +0 -79
- package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +0 -159
- package/vendor/dojo-1.10.10/dijit/selection.js +0 -364
- package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +0 -525
- package/vendor/dojo-1.10.10/dijit/typematic.js +0 -96
- package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +0 -211
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +0 -195
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +0 -761
- package/vendor/dojo-1.10.10/dojo/Stateful.js +0 -90
- package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +0 -218
- package/vendor/dojo-1.10.10/dojo/_base/url.js +0 -87
- package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +0 -109
- package/vendor/dojo-1.10.10/dojo/cache.js +0 -9
- package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +0 -7
- package/vendor/dojo-1.10.10/dojo/colors.js +0 -74
- package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +0 -232
- package/vendor/dojo-1.10.10/dojo/cookie.js +0 -48
- package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +0 -98
- package/vendor/dojo-1.10.10/dojo/date/stamp.js +0 -82
- package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +0 -144
- package/vendor/dojo-1.10.10/dojo/dojo.js +0 -7
- package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +0 -18680
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +0 -27
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +0 -101
- package/vendor/dojo-1.10.10/dojo/fx/easing.js +0 -165
- package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +0 -276
- package/vendor/dojo-1.10.10/dojo/fx.js +0 -271
- package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +0 -443
- package/vendor/dojo-1.10.10/dojo/hccss.js +0 -26
- package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +0 -52
- package/vendor/dojo-1.10.10/dojo/html.js +0 -161
- package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +0 -370
- package/vendor/dojo-1.10.10/dojo/io/iframe.js +0 -71
- package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +0 -190
- package/vendor/dojo-1.10.10/dojo/io/script.js +0 -112
- package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +0 -280
- package/vendor/dojo-1.10.10/dojo/parser.js +0 -437
- package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +0 -915
- package/vendor/dojo-1.10.10/dojo/promise/all.js +0 -59
- package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +0 -77
- package/vendor/dojo-1.10.10/dojo/regexp.js +0 -32
- package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +0 -70
- package/vendor/dojo-1.10.10/dojo/request/iframe.js +0 -291
- package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +0 -438
- package/vendor/dojo-1.10.10/dojo/request/script.js +0 -129
- package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +0 -237
- package/vendor/dojo-1.10.10/dojo/require.js +0 -11
- package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +0 -7
- package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
- package/vendor/dojo-1.10.10/dojo/string.js +0 -67
- package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +0 -181
- package/vendor/dojo-1.10.10/dojo/touch.js +0 -191
- package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +0 -468
- package/vendor/dojo-1.10.10/dojo/uacss.js +0 -36
- package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +0 -85
- package/vendor/dojo-1.10.10/dojo/window.js +0 -141
- package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +0 -241
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js +0 -626
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +0 -1220
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +0 -5
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +0 -16
- package/vendor/dojo-1.10.10/dojox/charting/Element.js +0 -247
- package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +0 -402
- package/vendor/dojo-1.10.10/dojox/charting/Series.js +0 -24
- package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +0 -58
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +0 -191
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +0 -577
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js +0 -42
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +0 -120
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +0 -11
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +0 -36
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +0 -77
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +0 -144
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +0 -58
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +0 -123
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +0 -54
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +0 -124
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +0 -28
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +0 -74
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +0 -116
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +0 -178
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +0 -24
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +0 -83
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +0 -557
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +0 -980
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +0 -65
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +0 -224
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +0 -91
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +0 -164
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +0 -7
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +0 -168
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +0 -311
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +0 -61
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +0 -161
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +0 -141
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +0 -242
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +0 -126
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +0 -243
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +0 -108
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +0 -290
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +0 -13
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +0 -13
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +0 -153
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +0 -249
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +0 -253
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +0 -472
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +0 -182
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +0 -356
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +0 -6
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +0 -6
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +0 -7
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +0 -13
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +0 -110
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +0 -208
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +0 -303
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +0 -547
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +0 -134
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +0 -207
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +0 -299
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +0 -537
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +0 -24
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +0 -44
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +0 -7
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +0 -22
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +0 -33
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +0 -20
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +0 -31
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +0 -6
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +0 -68
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +0 -120
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +0 -209
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +0 -214
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +0 -76
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +0 -77
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +0 -59
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +0 -70
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +0 -220
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +0 -262
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +0 -23
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +0 -36
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +0 -39
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +0 -106
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +0 -5
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +0 -4
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +0 -3
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +0 -102
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +0 -165
- package/vendor/dojo-1.10.10/dojox/color/Palette.js +0 -163
- package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +0 -460
- package/vendor/dojo-1.10.10/dojox/color/_base.js +0 -174
- package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +0 -196
- package/vendor/dojo-1.10.10/dojox/gfx/_base.js +0 -253
- package/vendor/dojo-1.10.10/dojox/gfx/_base.js.uncompressed.js +0 -1024
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js +0 -297
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +0 -350
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +0 -63
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +0 -91
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +0 -170
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +0 -501
- package/vendor/dojo-1.10.10/dojox/gfx/path.js +0 -319
- package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +0 -478
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js +0 -459
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +0 -1091
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js +0 -662
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +0 -1023
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js +0 -199
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +0 -322
- package/vendor/dojo-1.10.10/dojox/gfx.js +0 -2
- package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +0 -1136
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +0 -151
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +0 -169
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +0 -93
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +0 -125
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +0 -81
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +0 -132
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +0 -54
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +0 -78
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +0 -61
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +0 -77
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +0 -87
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +0 -107
- package/vendor/dojo-1.10.10/dojox/lang/functional.js +0 -4
- package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +0 -3
- package/vendor/dojo-1.10.10/dojox/lang/utils.js +0 -86
- package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +0 -121
- package/vendor/dojo-1.10.10/dojox/main.js +0 -4
- package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +0 -112
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +0 -208
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js +0 -62
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +0 -344
- package/vendor/dojo-1.10.10/dojox/storage/manager.js +0 -110
- package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +0 -263
|
@@ -1,1136 +0,0 @@
|
|
|
1
|
-
require({cache:{
|
|
2
|
-
'dojox/gfx/_base':function(){
|
|
3
|
-
define(["dojo/_base/kernel", "dojo/_base/lang", "dojo/_base/Color", "dojo/_base/sniff", "dojo/_base/window",
|
|
4
|
-
"dojo/_base/array","dojo/dom", "dojo/dom-construct","dojo/dom-geometry"],
|
|
5
|
-
function(kernel, lang, Color, has, win, arr, dom, domConstruct, domGeom){
|
|
6
|
-
// module:
|
|
7
|
-
// dojox/gfx
|
|
8
|
-
// summary:
|
|
9
|
-
// This module contains common core Graphics API used by different graphics renderers.
|
|
10
|
-
|
|
11
|
-
var g = lang.getObject("dojox.gfx", true),
|
|
12
|
-
b = g._base = {};
|
|
13
|
-
|
|
14
|
-
// candidates for dojox.style (work on VML and SVG nodes)
|
|
15
|
-
g._hasClass = function(/*DomNode*/node, /*String*/classStr){
|
|
16
|
-
// summary:
|
|
17
|
-
// Returns whether or not the specified classes are a portion of the
|
|
18
|
-
// class list currently applied to the node.
|
|
19
|
-
|
|
20
|
-
// return (new RegExp('(^|\\s+)'+classStr+'(\\s+|$)')).test(node.className) // Boolean
|
|
21
|
-
var cls = node.getAttribute("className");
|
|
22
|
-
return cls && (" " + cls + " ").indexOf(" " + classStr + " ") >= 0; // Boolean
|
|
23
|
-
};
|
|
24
|
-
g._addClass = function(/*DomNode*/node, /*String*/classStr){
|
|
25
|
-
// summary:
|
|
26
|
-
// Adds the specified classes to the end of the class list on the
|
|
27
|
-
// passed node.
|
|
28
|
-
var cls = node.getAttribute("className") || "";
|
|
29
|
-
if(!cls || (" " + cls + " ").indexOf(" " + classStr + " ") < 0){
|
|
30
|
-
node.setAttribute("className", cls + (cls ? " " : "") + classStr);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
g._removeClass = function(/*DomNode*/node, /*String*/classStr){
|
|
34
|
-
// summary:
|
|
35
|
-
// Removes classes from node.
|
|
36
|
-
var cls = node.getAttribute("className");
|
|
37
|
-
if(cls){
|
|
38
|
-
node.setAttribute(
|
|
39
|
-
"className",
|
|
40
|
-
cls.replace(new RegExp('(^|\\s+)' + classStr + '(\\s+|$)'), "$1$2")
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// candidate for dojox.html.metrics (dynamic font resize handler is not implemented here)
|
|
46
|
-
|
|
47
|
-
// derived from Morris John's emResized measurer
|
|
48
|
-
b._getFontMeasurements = function(){
|
|
49
|
-
// summary:
|
|
50
|
-
// Returns an object that has pixel equivilents of standard font
|
|
51
|
-
// size values.
|
|
52
|
-
var heights = {
|
|
53
|
-
'1em': 0, '1ex': 0, '100%': 0, '12pt': 0, '16px': 0, 'xx-small': 0,
|
|
54
|
-
'x-small': 0, 'small': 0, 'medium': 0, 'large': 0, 'x-large': 0,
|
|
55
|
-
'xx-large': 0
|
|
56
|
-
};
|
|
57
|
-
var p, oldStyle;
|
|
58
|
-
if(has("ie")){
|
|
59
|
-
// We do a font-size fix if and only if one isn't applied already.
|
|
60
|
-
// NOTE: If someone set the fontSize on the HTML Element, this will kill it.
|
|
61
|
-
oldStyle = win.doc.documentElement.style.fontSize || "";
|
|
62
|
-
if(!oldStyle){
|
|
63
|
-
win.doc.documentElement.style.fontSize="100%";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// set up the measuring node.
|
|
68
|
-
var div = domConstruct.create("div", {style: {
|
|
69
|
-
position: "absolute",
|
|
70
|
-
left: "0",
|
|
71
|
-
top: "-100px",
|
|
72
|
-
width: "30px",
|
|
73
|
-
height: "1000em",
|
|
74
|
-
borderWidth: "0",
|
|
75
|
-
margin: "0",
|
|
76
|
-
padding: "0",
|
|
77
|
-
outline: "none",
|
|
78
|
-
lineHeight: "1",
|
|
79
|
-
overflow: "hidden"
|
|
80
|
-
}}, win.body());
|
|
81
|
-
|
|
82
|
-
// do the measurements.
|
|
83
|
-
for(p in heights){
|
|
84
|
-
div.style.fontSize = p;
|
|
85
|
-
heights[p] = Math.round(div.offsetHeight * 12/16) * 16/12 / 1000;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if(has("ie")){
|
|
89
|
-
// Restore the font to its old style.
|
|
90
|
-
win.doc.documentElement.style.fontSize = oldStyle;
|
|
91
|
-
}
|
|
92
|
-
win.body().removeChild(div);
|
|
93
|
-
return heights; //object
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
var fontMeasurements = null;
|
|
97
|
-
|
|
98
|
-
b._getCachedFontMeasurements = function(recalculate){
|
|
99
|
-
if(recalculate || !fontMeasurements){
|
|
100
|
-
fontMeasurements = b._getFontMeasurements();
|
|
101
|
-
}
|
|
102
|
-
return fontMeasurements;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
// candidate for dojox.html.metrics
|
|
106
|
-
|
|
107
|
-
var measuringNode = null, empty = {};
|
|
108
|
-
b._getTextBox = function( /*String*/ text,
|
|
109
|
-
/*Object*/ style,
|
|
110
|
-
/*String?*/ className){
|
|
111
|
-
var m, s, al = arguments.length;
|
|
112
|
-
var i, box;
|
|
113
|
-
if(!measuringNode){
|
|
114
|
-
measuringNode = domConstruct.create("div", {style: {
|
|
115
|
-
position: "absolute",
|
|
116
|
-
top: "-10000px",
|
|
117
|
-
left: "0",
|
|
118
|
-
visibility: "hidden"
|
|
119
|
-
}}, win.body());
|
|
120
|
-
}
|
|
121
|
-
m = measuringNode;
|
|
122
|
-
// reset styles
|
|
123
|
-
m.className = "";
|
|
124
|
-
s = m.style;
|
|
125
|
-
s.borderWidth = "0";
|
|
126
|
-
s.margin = "0";
|
|
127
|
-
s.padding = "0";
|
|
128
|
-
s.outline = "0";
|
|
129
|
-
// set new style
|
|
130
|
-
if(al > 1 && style){
|
|
131
|
-
for(i in style){
|
|
132
|
-
if(i in empty){ continue; }
|
|
133
|
-
s[i] = style[i];
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
// set classes
|
|
137
|
-
if(al > 2 && className){
|
|
138
|
-
m.className = className;
|
|
139
|
-
}
|
|
140
|
-
// take a measure
|
|
141
|
-
m.innerHTML = text;
|
|
142
|
-
|
|
143
|
-
if(m.getBoundingClientRect){
|
|
144
|
-
var bcr = m.getBoundingClientRect();
|
|
145
|
-
box = {l: bcr.left, t: bcr.top, w: bcr.width || (bcr.right - bcr.left), h: bcr.height || (bcr.bottom - bcr.top)};
|
|
146
|
-
}else{
|
|
147
|
-
box = domGeom.getMarginBox(m);
|
|
148
|
-
}
|
|
149
|
-
m.innerHTML = "";
|
|
150
|
-
return box;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
b._computeTextLocation = function(/*g.defaultTextShape*/textShape, /*Number*/width, /*Number*/height, /*Boolean*/fixHeight) {
|
|
154
|
-
var loc = {}, align = textShape.align;
|
|
155
|
-
switch (align) {
|
|
156
|
-
case 'end':
|
|
157
|
-
loc.x = textShape.x - width;
|
|
158
|
-
break;
|
|
159
|
-
case 'middle':
|
|
160
|
-
loc.x = textShape.x - width / 2;
|
|
161
|
-
break;
|
|
162
|
-
default:
|
|
163
|
-
loc.x = textShape.x;
|
|
164
|
-
break;
|
|
165
|
-
}
|
|
166
|
-
var c = fixHeight ? 0.75 : 1;
|
|
167
|
-
loc.y = textShape.y - height*c; // **rough** approximation of the ascent...
|
|
168
|
-
return loc;
|
|
169
|
-
};
|
|
170
|
-
b._computeTextBoundingBox = function(/*shape.Text*/s){
|
|
171
|
-
// summary:
|
|
172
|
-
// Compute the bbox of the given shape.Text instance. Note that this method returns an
|
|
173
|
-
// approximation of the bbox, and should be used when the underlying renderer cannot provide precise metrics.
|
|
174
|
-
if(!g._base._isRendered(s)){
|
|
175
|
-
return {x:0, y:0, width:0, height:0};
|
|
176
|
-
}
|
|
177
|
-
var loc, textShape = s.getShape(),
|
|
178
|
-
font = s.getFont() || g.defaultFont,
|
|
179
|
-
w = s.getTextWidth(),
|
|
180
|
-
h = g.normalizedLength(font.size);
|
|
181
|
-
loc = b._computeTextLocation(textShape, w, h, true);
|
|
182
|
-
return {
|
|
183
|
-
x: loc.x,
|
|
184
|
-
y: loc.y,
|
|
185
|
-
width: w,
|
|
186
|
-
height: h
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
b._isRendered = function(/*Shape*/s){
|
|
190
|
-
var p = s.parent;
|
|
191
|
-
while(p && p.getParent){
|
|
192
|
-
p = p.parent;
|
|
193
|
-
}
|
|
194
|
-
return p !== null;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
// candidate for dojo.dom
|
|
198
|
-
|
|
199
|
-
var uniqueId = 0;
|
|
200
|
-
b._getUniqueId = function(){
|
|
201
|
-
// summary:
|
|
202
|
-
// returns a unique string for use with any DOM element
|
|
203
|
-
var id;
|
|
204
|
-
do{
|
|
205
|
-
id = kernel._scopeName + "xUnique" + (++uniqueId);
|
|
206
|
-
}while(dom.byId(id));
|
|
207
|
-
return id;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
// IE10
|
|
211
|
-
|
|
212
|
-
var touchActionProp = has("pointer-events") ? "touchAction" : has("MSPointer") ? "msTouchAction" : null;
|
|
213
|
-
b._fixMsTouchAction = touchActionProp ? function(/*dojox/gfx/shape.Surface*/surface){
|
|
214
|
-
surface.rawNode.style[touchActionProp] = "none";
|
|
215
|
-
} : function() {};
|
|
216
|
-
|
|
217
|
-
/*=====
|
|
218
|
-
g.Stroke = {
|
|
219
|
-
// summary:
|
|
220
|
-
// A stroke defines stylistic properties that are used when drawing a path.
|
|
221
|
-
|
|
222
|
-
// color: String
|
|
223
|
-
// The color of the stroke, default value 'black'.
|
|
224
|
-
color: "black",
|
|
225
|
-
|
|
226
|
-
// style: String
|
|
227
|
-
// The style of the stroke, one of 'solid', ... . Default value 'solid'.
|
|
228
|
-
style: "solid",
|
|
229
|
-
|
|
230
|
-
// width: Number
|
|
231
|
-
// The width of a stroke, default value 1.
|
|
232
|
-
width: 1,
|
|
233
|
-
|
|
234
|
-
// cap: String
|
|
235
|
-
// The endcap style of the path. One of 'butt', 'round', ... . Default value 'butt'.
|
|
236
|
-
cap: "butt",
|
|
237
|
-
|
|
238
|
-
// join: Number
|
|
239
|
-
// The join style to use when combining path segments. Default value 4.
|
|
240
|
-
join: 4
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
g.Fill = {
|
|
244
|
-
// summary:
|
|
245
|
-
// Defines how to fill a shape. Four types of fills can be used: solid, linear gradient, radial gradient and pattern.
|
|
246
|
-
// See dojox/gfx.LinearGradient, dojox/gfx.RadialGradient and dojox/gfx.Pattern respectively for more information about the properties supported by each type.
|
|
247
|
-
|
|
248
|
-
// type: String?
|
|
249
|
-
// The type of fill. One of 'linear', 'radial', 'pattern' or undefined. If not specified, a solid fill is assumed.
|
|
250
|
-
type:"",
|
|
251
|
-
|
|
252
|
-
// color: String|dojo/Color?
|
|
253
|
-
// The color of a solid fill type.
|
|
254
|
-
color:null,
|
|
255
|
-
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
g.LinearGradient = {
|
|
259
|
-
// summary:
|
|
260
|
-
// An object defining the default stylistic properties used for Linear Gradient fills.
|
|
261
|
-
// Linear gradients are drawn along a virtual line, which results in appearance of a rotated pattern in a given direction/orientation.
|
|
262
|
-
|
|
263
|
-
// type: String
|
|
264
|
-
// Specifies this object is a Linear Gradient, value 'linear'
|
|
265
|
-
type: "linear",
|
|
266
|
-
|
|
267
|
-
// x1: Number
|
|
268
|
-
// The X coordinate of the start of the virtual line along which the gradient is drawn, default value 0.
|
|
269
|
-
x1: 0,
|
|
270
|
-
|
|
271
|
-
// y1: Number
|
|
272
|
-
// The Y coordinate of the start of the virtual line along which the gradient is drawn, default value 0.
|
|
273
|
-
y1: 0,
|
|
274
|
-
|
|
275
|
-
// x2: Number
|
|
276
|
-
// The X coordinate of the end of the virtual line along which the gradient is drawn, default value 100.
|
|
277
|
-
x2: 100,
|
|
278
|
-
|
|
279
|
-
// y2: Number
|
|
280
|
-
// The Y coordinate of the end of the virtual line along which the gradient is drawn, default value 100.
|
|
281
|
-
y2: 100,
|
|
282
|
-
|
|
283
|
-
// colors: Array
|
|
284
|
-
// An array of colors at given offsets (from the start of the line). The start of the line is
|
|
285
|
-
// defined at offest 0 with the end of the line at offset 1.
|
|
286
|
-
// Default value, [{ offset: 0, color: 'black'},{offset: 1, color: 'white'}], is a gradient from black to white.
|
|
287
|
-
colors: []
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
g.RadialGradient = {
|
|
291
|
-
// summary:
|
|
292
|
-
// Specifies the properties for RadialGradients using in fills patterns.
|
|
293
|
-
|
|
294
|
-
// type: String
|
|
295
|
-
// Specifies this is a RadialGradient, value 'radial'
|
|
296
|
-
type: "radial",
|
|
297
|
-
|
|
298
|
-
// cx: Number
|
|
299
|
-
// The X coordinate of the center of the radial gradient, default value 0.
|
|
300
|
-
cx: 0,
|
|
301
|
-
|
|
302
|
-
// cy: Number
|
|
303
|
-
// The Y coordinate of the center of the radial gradient, default value 0.
|
|
304
|
-
cy: 0,
|
|
305
|
-
|
|
306
|
-
// r: Number
|
|
307
|
-
// The radius to the end of the radial gradient, default value 100.
|
|
308
|
-
r: 100,
|
|
309
|
-
|
|
310
|
-
// colors: Array
|
|
311
|
-
// An array of colors at given offsets (from the center of the radial gradient).
|
|
312
|
-
// The center is defined at offest 0 with the outer edge of the gradient at offset 1.
|
|
313
|
-
// Default value, [{ offset: 0, color: 'black'},{offset: 1, color: 'white'}], is a gradient from black to white.
|
|
314
|
-
colors: []
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
g.Pattern = {
|
|
318
|
-
// summary:
|
|
319
|
-
// An object specifying the default properties for a Pattern using in fill operations.
|
|
320
|
-
|
|
321
|
-
// type: String
|
|
322
|
-
// Specifies this object is a Pattern, value 'pattern'.
|
|
323
|
-
type: "pattern",
|
|
324
|
-
|
|
325
|
-
// x: Number
|
|
326
|
-
// The X coordinate of the position of the pattern, default value is 0.
|
|
327
|
-
x: 0,
|
|
328
|
-
|
|
329
|
-
// y: Number
|
|
330
|
-
// The Y coordinate of the position of the pattern, default value is 0.
|
|
331
|
-
y: 0,
|
|
332
|
-
|
|
333
|
-
// width: Number
|
|
334
|
-
// The width of the pattern image, default value is 0.
|
|
335
|
-
width: 0,
|
|
336
|
-
|
|
337
|
-
// height: Number
|
|
338
|
-
// The height of the pattern image, default value is 0.
|
|
339
|
-
height: 0,
|
|
340
|
-
|
|
341
|
-
// src: String
|
|
342
|
-
// A url specifying the image to use for the pattern.
|
|
343
|
-
src: ""
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
g.Text = {
|
|
347
|
-
// summary:
|
|
348
|
-
// A keyword argument object defining both the text to be rendered in a VectorText shape,
|
|
349
|
-
// and specifying position, alignment, and fitting.
|
|
350
|
-
// text: String
|
|
351
|
-
// The text to be rendered.
|
|
352
|
-
// x: Number?
|
|
353
|
-
// The left coordinate for the text's bounding box.
|
|
354
|
-
// y: Number?
|
|
355
|
-
// The top coordinate for the text's bounding box.
|
|
356
|
-
// width: Number?
|
|
357
|
-
// The width of the text's bounding box.
|
|
358
|
-
// height: Number?
|
|
359
|
-
// The height of the text's bounding box.
|
|
360
|
-
// align: String?
|
|
361
|
-
// The alignment of the text, as defined in SVG. Can be "start", "end" or "middle".
|
|
362
|
-
// fitting: Number?
|
|
363
|
-
// How the text is to be fitted to the bounding box. Can be 0 (no fitting), 1 (fitting based on
|
|
364
|
-
// passed width of the bounding box and the size of the font), or 2 (fit text to the bounding box,
|
|
365
|
-
// and ignore any size parameters).
|
|
366
|
-
// leading: Number?
|
|
367
|
-
// The leading to be used between lines in the text.
|
|
368
|
-
// decoration: String?
|
|
369
|
-
// Any text decoration to be used.
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
g.Font = {
|
|
373
|
-
// summary:
|
|
374
|
-
// An object specifying the properties for a Font used in text operations.
|
|
375
|
-
|
|
376
|
-
// type: String
|
|
377
|
-
// Specifies this object is a Font, value 'font'.
|
|
378
|
-
type: "font",
|
|
379
|
-
|
|
380
|
-
// style: String
|
|
381
|
-
// The font style, one of 'normal', 'bold', default value 'normal'.
|
|
382
|
-
style: "normal",
|
|
383
|
-
|
|
384
|
-
// variant: String
|
|
385
|
-
// The font variant, one of 'normal', ... , default value 'normal'.
|
|
386
|
-
variant: "normal",
|
|
387
|
-
|
|
388
|
-
// weight: String
|
|
389
|
-
// The font weight, one of 'normal', ..., default value 'normal'.
|
|
390
|
-
weight: "normal",
|
|
391
|
-
|
|
392
|
-
// size: String
|
|
393
|
-
// The font size (including units), default value '10pt'.
|
|
394
|
-
size: "10pt",
|
|
395
|
-
|
|
396
|
-
// family: String
|
|
397
|
-
// The font family, one of 'serif', 'sanserif', ..., default value 'serif'.
|
|
398
|
-
family: "serif"
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
=====*/
|
|
402
|
-
|
|
403
|
-
lang.mixin(g, {
|
|
404
|
-
// summary:
|
|
405
|
-
// defines constants, prototypes, and utility functions for the core Graphics API
|
|
406
|
-
|
|
407
|
-
// default shapes, which are used to fill in missing parameters
|
|
408
|
-
defaultPath: {
|
|
409
|
-
// summary:
|
|
410
|
-
// Defines the default Path prototype object.
|
|
411
|
-
|
|
412
|
-
// type: String
|
|
413
|
-
// Specifies this object is a Path, default value 'path'.
|
|
414
|
-
type: "path",
|
|
415
|
-
|
|
416
|
-
// path: String
|
|
417
|
-
// The path commands. See W32C SVG 1.0 specification.
|
|
418
|
-
// Defaults to empty string value.
|
|
419
|
-
path: ""
|
|
420
|
-
},
|
|
421
|
-
defaultPolyline: {
|
|
422
|
-
// summary:
|
|
423
|
-
// Defines the default PolyLine prototype.
|
|
424
|
-
|
|
425
|
-
// type: String
|
|
426
|
-
// Specifies this object is a PolyLine, default value 'polyline'.
|
|
427
|
-
type: "polyline",
|
|
428
|
-
|
|
429
|
-
// points: Array
|
|
430
|
-
// An array of point objects [{x:0,y:0},...] defining the default polyline's line segments. Value is an empty array [].
|
|
431
|
-
points: []
|
|
432
|
-
},
|
|
433
|
-
defaultRect: {
|
|
434
|
-
// summary:
|
|
435
|
-
// Defines the default Rect prototype.
|
|
436
|
-
|
|
437
|
-
// type: String
|
|
438
|
-
// Specifies this default object is a type of Rect. Value is 'rect'
|
|
439
|
-
type: "rect",
|
|
440
|
-
|
|
441
|
-
// x: Number
|
|
442
|
-
// The X coordinate of the default rectangles position, value 0.
|
|
443
|
-
x: 0,
|
|
444
|
-
|
|
445
|
-
// y: Number
|
|
446
|
-
// The Y coordinate of the default rectangle's position, value 0.
|
|
447
|
-
y: 0,
|
|
448
|
-
|
|
449
|
-
// width: Number
|
|
450
|
-
// The width of the default rectangle, value 100.
|
|
451
|
-
width: 100,
|
|
452
|
-
|
|
453
|
-
// height: Number
|
|
454
|
-
// The height of the default rectangle, value 100.
|
|
455
|
-
height: 100,
|
|
456
|
-
|
|
457
|
-
// r: Number
|
|
458
|
-
// The corner radius for the default rectangle, value 0.
|
|
459
|
-
r: 0
|
|
460
|
-
},
|
|
461
|
-
defaultEllipse: {
|
|
462
|
-
// summary:
|
|
463
|
-
// Defines the default Ellipse prototype.
|
|
464
|
-
|
|
465
|
-
// type: String
|
|
466
|
-
// Specifies that this object is a type of Ellipse, value is 'ellipse'
|
|
467
|
-
type: "ellipse",
|
|
468
|
-
|
|
469
|
-
// cx: Number
|
|
470
|
-
// The X coordinate of the center of the ellipse, default value 0.
|
|
471
|
-
cx: 0,
|
|
472
|
-
|
|
473
|
-
// cy: Number
|
|
474
|
-
// The Y coordinate of the center of the ellipse, default value 0.
|
|
475
|
-
cy: 0,
|
|
476
|
-
|
|
477
|
-
// rx: Number
|
|
478
|
-
// The radius of the ellipse in the X direction, default value 200.
|
|
479
|
-
rx: 200,
|
|
480
|
-
|
|
481
|
-
// ry: Number
|
|
482
|
-
// The radius of the ellipse in the Y direction, default value 200.
|
|
483
|
-
ry: 100
|
|
484
|
-
},
|
|
485
|
-
defaultCircle: {
|
|
486
|
-
// summary:
|
|
487
|
-
// An object defining the default Circle prototype.
|
|
488
|
-
|
|
489
|
-
// type: String
|
|
490
|
-
// Specifies this object is a circle, value 'circle'
|
|
491
|
-
type: "circle",
|
|
492
|
-
|
|
493
|
-
// cx: Number
|
|
494
|
-
// The X coordinate of the center of the circle, default value 0.
|
|
495
|
-
cx: 0,
|
|
496
|
-
// cy: Number
|
|
497
|
-
// The Y coordinate of the center of the circle, default value 0.
|
|
498
|
-
cy: 0,
|
|
499
|
-
|
|
500
|
-
// r: Number
|
|
501
|
-
// The radius, default value 100.
|
|
502
|
-
r: 100
|
|
503
|
-
},
|
|
504
|
-
defaultLine: {
|
|
505
|
-
// summary:
|
|
506
|
-
// An object defining the default Line prototype.
|
|
507
|
-
|
|
508
|
-
// type: String
|
|
509
|
-
// Specifies this is a Line, value 'line'
|
|
510
|
-
type: "line",
|
|
511
|
-
|
|
512
|
-
// x1: Number
|
|
513
|
-
// The X coordinate of the start of the line, default value 0.
|
|
514
|
-
x1: 0,
|
|
515
|
-
|
|
516
|
-
// y1: Number
|
|
517
|
-
// The Y coordinate of the start of the line, default value 0.
|
|
518
|
-
y1: 0,
|
|
519
|
-
|
|
520
|
-
// x2: Number
|
|
521
|
-
// The X coordinate of the end of the line, default value 100.
|
|
522
|
-
x2: 100,
|
|
523
|
-
|
|
524
|
-
// y2: Number
|
|
525
|
-
// The Y coordinate of the end of the line, default value 100.
|
|
526
|
-
y2: 100
|
|
527
|
-
},
|
|
528
|
-
defaultImage: {
|
|
529
|
-
// summary:
|
|
530
|
-
// Defines the default Image prototype.
|
|
531
|
-
|
|
532
|
-
// type: String
|
|
533
|
-
// Specifies this object is an image, value 'image'.
|
|
534
|
-
type: "image",
|
|
535
|
-
|
|
536
|
-
// x: Number
|
|
537
|
-
// The X coordinate of the image's position, default value 0.
|
|
538
|
-
x: 0,
|
|
539
|
-
|
|
540
|
-
// y: Number
|
|
541
|
-
// The Y coordinate of the image's position, default value 0.
|
|
542
|
-
y: 0,
|
|
543
|
-
|
|
544
|
-
// width: Number
|
|
545
|
-
// The width of the image, default value 0.
|
|
546
|
-
width: 0,
|
|
547
|
-
|
|
548
|
-
// height: Number
|
|
549
|
-
// The height of the image, default value 0.
|
|
550
|
-
height: 0,
|
|
551
|
-
|
|
552
|
-
// src: String
|
|
553
|
-
// The src url of the image, defaults to empty string.
|
|
554
|
-
src: ""
|
|
555
|
-
},
|
|
556
|
-
defaultText: {
|
|
557
|
-
// summary:
|
|
558
|
-
// Defines the default Text prototype.
|
|
559
|
-
|
|
560
|
-
// type: String
|
|
561
|
-
// Specifies this is a Text shape, value 'text'.
|
|
562
|
-
type: "text",
|
|
563
|
-
|
|
564
|
-
// x: Number
|
|
565
|
-
// The X coordinate of the text position, default value 0.
|
|
566
|
-
x: 0,
|
|
567
|
-
|
|
568
|
-
// y: Number
|
|
569
|
-
// The Y coordinate of the text position, default value 0.
|
|
570
|
-
y: 0,
|
|
571
|
-
|
|
572
|
-
// text: String
|
|
573
|
-
// The text to be displayed, default value empty string.
|
|
574
|
-
text: "",
|
|
575
|
-
|
|
576
|
-
// align: String
|
|
577
|
-
// The horizontal text alignment, one of 'start', 'end', 'center'. Default value 'start'.
|
|
578
|
-
align: "start",
|
|
579
|
-
|
|
580
|
-
// decoration: String
|
|
581
|
-
// The text decoration , one of 'none', ... . Default value 'none'.
|
|
582
|
-
decoration: "none",
|
|
583
|
-
|
|
584
|
-
// rotated: Boolean
|
|
585
|
-
// Whether the text is rotated, boolean default value false.
|
|
586
|
-
rotated: false,
|
|
587
|
-
|
|
588
|
-
// kerning: Boolean
|
|
589
|
-
// Whether kerning is used on the text, boolean default value true.
|
|
590
|
-
kerning: true
|
|
591
|
-
},
|
|
592
|
-
defaultTextPath: {
|
|
593
|
-
// summary:
|
|
594
|
-
// Defines the default TextPath prototype.
|
|
595
|
-
|
|
596
|
-
// type: String
|
|
597
|
-
// Specifies this is a TextPath, value 'textpath'.
|
|
598
|
-
type: "textpath",
|
|
599
|
-
|
|
600
|
-
// text: String
|
|
601
|
-
// The text to be displayed, default value empty string.
|
|
602
|
-
text: "",
|
|
603
|
-
|
|
604
|
-
// align: String
|
|
605
|
-
// The horizontal text alignment, one of 'start', 'end', 'center'. Default value 'start'.
|
|
606
|
-
align: "start",
|
|
607
|
-
|
|
608
|
-
// decoration: String
|
|
609
|
-
// The text decoration , one of 'none', ... . Default value 'none'.
|
|
610
|
-
decoration: "none",
|
|
611
|
-
|
|
612
|
-
// rotated: Boolean
|
|
613
|
-
// Whether the text is rotated, boolean default value false.
|
|
614
|
-
rotated: false,
|
|
615
|
-
|
|
616
|
-
// kerning: Boolean
|
|
617
|
-
// Whether kerning is used on the text, boolean default value true.
|
|
618
|
-
kerning: true
|
|
619
|
-
},
|
|
620
|
-
|
|
621
|
-
// default stylistic attributes
|
|
622
|
-
defaultStroke: {
|
|
623
|
-
// summary:
|
|
624
|
-
// A stroke defines stylistic properties that are used when drawing a path.
|
|
625
|
-
// This object defines the default Stroke prototype.
|
|
626
|
-
// type: String
|
|
627
|
-
// Specifies this object is a type of Stroke, value 'stroke'.
|
|
628
|
-
type: "stroke",
|
|
629
|
-
|
|
630
|
-
// color: String
|
|
631
|
-
// The color of the stroke, default value 'black'.
|
|
632
|
-
color: "black",
|
|
633
|
-
|
|
634
|
-
// style: String
|
|
635
|
-
// The style of the stroke, one of 'solid', ... . Default value 'solid'.
|
|
636
|
-
style: "solid",
|
|
637
|
-
|
|
638
|
-
// width: Number
|
|
639
|
-
// The width of a stroke, default value 1.
|
|
640
|
-
width: 1,
|
|
641
|
-
|
|
642
|
-
// cap: String
|
|
643
|
-
// The endcap style of the path. One of 'butt', 'round', ... . Default value 'butt'.
|
|
644
|
-
cap: "butt",
|
|
645
|
-
|
|
646
|
-
// join: Number
|
|
647
|
-
// The join style to use when combining path segments. Default value 4.
|
|
648
|
-
join: 4
|
|
649
|
-
},
|
|
650
|
-
defaultLinearGradient: {
|
|
651
|
-
// summary:
|
|
652
|
-
// An object defining the default stylistic properties used for Linear Gradient fills.
|
|
653
|
-
// Linear gradients are drawn along a virtual line, which results in appearance of a rotated pattern in a given direction/orientation.
|
|
654
|
-
|
|
655
|
-
// type: String
|
|
656
|
-
// Specifies this object is a Linear Gradient, value 'linear'
|
|
657
|
-
type: "linear",
|
|
658
|
-
|
|
659
|
-
// x1: Number
|
|
660
|
-
// The X coordinate of the start of the virtual line along which the gradient is drawn, default value 0.
|
|
661
|
-
x1: 0,
|
|
662
|
-
|
|
663
|
-
// y1: Number
|
|
664
|
-
// The Y coordinate of the start of the virtual line along which the gradient is drawn, default value 0.
|
|
665
|
-
y1: 0,
|
|
666
|
-
|
|
667
|
-
// x2: Number
|
|
668
|
-
// The X coordinate of the end of the virtual line along which the gradient is drawn, default value 100.
|
|
669
|
-
x2: 100,
|
|
670
|
-
|
|
671
|
-
// y2: Number
|
|
672
|
-
// The Y coordinate of the end of the virtual line along which the gradient is drawn, default value 100.
|
|
673
|
-
y2: 100,
|
|
674
|
-
|
|
675
|
-
// colors: Array
|
|
676
|
-
// An array of colors at given offsets (from the start of the line). The start of the line is
|
|
677
|
-
// defined at offest 0 with the end of the line at offset 1.
|
|
678
|
-
// Default value, [{ offset: 0, color: 'black'},{offset: 1, color: 'white'}], is a gradient from black to white.
|
|
679
|
-
colors: [
|
|
680
|
-
{ offset: 0, color: "black" }, { offset: 1, color: "white" }
|
|
681
|
-
]
|
|
682
|
-
},
|
|
683
|
-
defaultRadialGradient: {
|
|
684
|
-
// summary:
|
|
685
|
-
// An object specifying the default properties for RadialGradients using in fills patterns.
|
|
686
|
-
|
|
687
|
-
// type: String
|
|
688
|
-
// Specifies this is a RadialGradient, value 'radial'
|
|
689
|
-
type: "radial",
|
|
690
|
-
|
|
691
|
-
// cx: Number
|
|
692
|
-
// The X coordinate of the center of the radial gradient, default value 0.
|
|
693
|
-
cx: 0,
|
|
694
|
-
|
|
695
|
-
// cy: Number
|
|
696
|
-
// The Y coordinate of the center of the radial gradient, default value 0.
|
|
697
|
-
cy: 0,
|
|
698
|
-
|
|
699
|
-
// r: Number
|
|
700
|
-
// The radius to the end of the radial gradient, default value 100.
|
|
701
|
-
r: 100,
|
|
702
|
-
|
|
703
|
-
// colors: Array
|
|
704
|
-
// An array of colors at given offsets (from the center of the radial gradient).
|
|
705
|
-
// The center is defined at offest 0 with the outer edge of the gradient at offset 1.
|
|
706
|
-
// Default value, [{ offset: 0, color: 'black'},{offset: 1, color: 'white'}], is a gradient from black to white.
|
|
707
|
-
colors: [
|
|
708
|
-
{ offset: 0, color: "black" }, { offset: 1, color: "white" }
|
|
709
|
-
]
|
|
710
|
-
},
|
|
711
|
-
defaultPattern: {
|
|
712
|
-
// summary:
|
|
713
|
-
// An object specifying the default properties for a Pattern using in fill operations.
|
|
714
|
-
|
|
715
|
-
// type: String
|
|
716
|
-
// Specifies this object is a Pattern, value 'pattern'.
|
|
717
|
-
type: "pattern",
|
|
718
|
-
|
|
719
|
-
// x: Number
|
|
720
|
-
// The X coordinate of the position of the pattern, default value is 0.
|
|
721
|
-
x: 0,
|
|
722
|
-
|
|
723
|
-
// y: Number
|
|
724
|
-
// The Y coordinate of the position of the pattern, default value is 0.
|
|
725
|
-
y: 0,
|
|
726
|
-
|
|
727
|
-
// width: Number
|
|
728
|
-
// The width of the pattern image, default value is 0.
|
|
729
|
-
width: 0,
|
|
730
|
-
|
|
731
|
-
// height: Number
|
|
732
|
-
// The height of the pattern image, default value is 0.
|
|
733
|
-
height: 0,
|
|
734
|
-
|
|
735
|
-
// src: String
|
|
736
|
-
// A url specifying the image to use for the pattern.
|
|
737
|
-
src: ""
|
|
738
|
-
},
|
|
739
|
-
defaultFont: {
|
|
740
|
-
// summary:
|
|
741
|
-
// An object specifying the default properties for a Font used in text operations.
|
|
742
|
-
|
|
743
|
-
// type: String
|
|
744
|
-
// Specifies this object is a Font, value 'font'.
|
|
745
|
-
type: "font",
|
|
746
|
-
|
|
747
|
-
// style: String
|
|
748
|
-
// The font style, one of 'normal', 'bold', default value 'normal'.
|
|
749
|
-
style: "normal",
|
|
750
|
-
|
|
751
|
-
// variant: String
|
|
752
|
-
// The font variant, one of 'normal', ... , default value 'normal'.
|
|
753
|
-
variant: "normal",
|
|
754
|
-
|
|
755
|
-
// weight: String
|
|
756
|
-
// The font weight, one of 'normal', ..., default value 'normal'.
|
|
757
|
-
weight: "normal",
|
|
758
|
-
|
|
759
|
-
// size: String
|
|
760
|
-
// The font size (including units), default value '10pt'.
|
|
761
|
-
size: "10pt",
|
|
762
|
-
|
|
763
|
-
// family: String
|
|
764
|
-
// The font family, one of 'serif', 'sanserif', ..., default value 'serif'.
|
|
765
|
-
family: "serif"
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
getDefault: (function(){
|
|
769
|
-
// summary:
|
|
770
|
-
// Returns a function used to access default memoized prototype objects (see them defined above).
|
|
771
|
-
var typeCtorCache = {};
|
|
772
|
-
// a memoized delegate()
|
|
773
|
-
return function(/*String*/ type){
|
|
774
|
-
var t = typeCtorCache[type];
|
|
775
|
-
if(t){
|
|
776
|
-
return new t();
|
|
777
|
-
}
|
|
778
|
-
t = typeCtorCache[type] = new Function();
|
|
779
|
-
t.prototype = g[ "default" + type ];
|
|
780
|
-
return new t();
|
|
781
|
-
}
|
|
782
|
-
})(),
|
|
783
|
-
|
|
784
|
-
normalizeColor: function(/*dojo/Color|Array|string|Object*/ color){
|
|
785
|
-
// summary:
|
|
786
|
-
// converts any legal color representation to normalized
|
|
787
|
-
// dojo/Color object
|
|
788
|
-
// color:
|
|
789
|
-
// A color representation.
|
|
790
|
-
return (color instanceof Color) ? color : new Color(color); // dojo/Color
|
|
791
|
-
},
|
|
792
|
-
normalizeParameters: function(existed, update){
|
|
793
|
-
// summary:
|
|
794
|
-
// updates an existing object with properties from an 'update'
|
|
795
|
-
// object
|
|
796
|
-
// existed: Object
|
|
797
|
-
// the target object to be updated
|
|
798
|
-
// update: Object
|
|
799
|
-
// the 'update' object, whose properties will be used to update
|
|
800
|
-
// the existed object
|
|
801
|
-
var x;
|
|
802
|
-
if(update){
|
|
803
|
-
var empty = {};
|
|
804
|
-
for(x in existed){
|
|
805
|
-
if(x in update && !(x in empty)){
|
|
806
|
-
existed[x] = update[x];
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
return existed; // Object
|
|
811
|
-
},
|
|
812
|
-
makeParameters: function(defaults, update){
|
|
813
|
-
// summary:
|
|
814
|
-
// copies the original object, and all copied properties from the
|
|
815
|
-
// 'update' object
|
|
816
|
-
// defaults: Object
|
|
817
|
-
// the object to be cloned before updating
|
|
818
|
-
// update: Object
|
|
819
|
-
// the object, which properties are to be cloned during updating
|
|
820
|
-
// returns: Object
|
|
821
|
-
// new object with new and default properties
|
|
822
|
-
var i = null;
|
|
823
|
-
if(!update){
|
|
824
|
-
// return dojo.clone(defaults);
|
|
825
|
-
return lang.delegate(defaults);
|
|
826
|
-
}
|
|
827
|
-
var result = {};
|
|
828
|
-
for(i in defaults){
|
|
829
|
-
if(!(i in result)){
|
|
830
|
-
result[i] = lang.clone((i in update) ? update[i] : defaults[i]);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
return result; // Object
|
|
834
|
-
},
|
|
835
|
-
formatNumber: function(x, addSpace){
|
|
836
|
-
// summary:
|
|
837
|
-
// converts a number to a string using a fixed notation
|
|
838
|
-
// x: Number
|
|
839
|
-
// number to be converted
|
|
840
|
-
// addSpace: Boolean
|
|
841
|
-
// whether to add a space before a positive number
|
|
842
|
-
// returns: String
|
|
843
|
-
// the formatted value
|
|
844
|
-
var val = x.toString();
|
|
845
|
-
if(val.indexOf("e") >= 0){
|
|
846
|
-
val = x.toFixed(4);
|
|
847
|
-
}else{
|
|
848
|
-
var point = val.indexOf(".");
|
|
849
|
-
if(point >= 0 && val.length - point > 5){
|
|
850
|
-
val = x.toFixed(4);
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
if(x < 0){
|
|
854
|
-
return val; // String
|
|
855
|
-
}
|
|
856
|
-
return addSpace ? " " + val : val; // String
|
|
857
|
-
},
|
|
858
|
-
// font operations
|
|
859
|
-
makeFontString: function(font){
|
|
860
|
-
// summary:
|
|
861
|
-
// converts a font object to a CSS font string
|
|
862
|
-
// font: Object
|
|
863
|
-
// font object (see dojox/gfx.defaultFont)
|
|
864
|
-
return font.style + " " + font.variant + " " + font.weight + " " + font.size + " " + font.family; // Object
|
|
865
|
-
},
|
|
866
|
-
splitFontString: function(str){
|
|
867
|
-
// summary:
|
|
868
|
-
// converts a CSS font string to a font object
|
|
869
|
-
// description:
|
|
870
|
-
// Converts a CSS font string to a gfx font object. The CSS font
|
|
871
|
-
// string components should follow the W3C specified order
|
|
872
|
-
// (see http://www.w3.org/TR/CSS2/fonts.html#font-shorthand):
|
|
873
|
-
// style, variant, weight, size, optional line height (will be
|
|
874
|
-
// ignored), and family. Note that the Font.size attribute is limited to numeric CSS length.
|
|
875
|
-
// str: String
|
|
876
|
-
// a CSS font string.
|
|
877
|
-
// returns: Object
|
|
878
|
-
// object in dojox/gfx.defaultFont format
|
|
879
|
-
var font = g.getDefault("Font");
|
|
880
|
-
var t = str.split(/\s+/);
|
|
881
|
-
do{
|
|
882
|
-
if(t.length < 5){ break; }
|
|
883
|
-
font.style = t[0];
|
|
884
|
-
font.variant = t[1];
|
|
885
|
-
font.weight = t[2];
|
|
886
|
-
var i = t[3].indexOf("/");
|
|
887
|
-
font.size = i < 0 ? t[3] : t[3].substring(0, i);
|
|
888
|
-
var j = 4;
|
|
889
|
-
if(i < 0){
|
|
890
|
-
if(t[4] == "/"){
|
|
891
|
-
j = 6;
|
|
892
|
-
}else if(t[4].charAt(0) == "/"){
|
|
893
|
-
j = 5;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
if(j < t.length){
|
|
897
|
-
font.family = t.slice(j).join(" ");
|
|
898
|
-
}
|
|
899
|
-
}while(false);
|
|
900
|
-
return font; // Object
|
|
901
|
-
},
|
|
902
|
-
// length operations
|
|
903
|
-
|
|
904
|
-
// cm_in_pt: Number
|
|
905
|
-
// points per centimeter (constant)
|
|
906
|
-
cm_in_pt: 72 / 2.54,
|
|
907
|
-
|
|
908
|
-
// mm_in_pt: Number
|
|
909
|
-
// points per millimeter (constant)
|
|
910
|
-
mm_in_pt: 7.2 / 2.54,
|
|
911
|
-
|
|
912
|
-
px_in_pt: function(){
|
|
913
|
-
// summary:
|
|
914
|
-
// returns the current number of pixels per point.
|
|
915
|
-
return g._base._getCachedFontMeasurements()["12pt"] / 12; // Number
|
|
916
|
-
},
|
|
917
|
-
|
|
918
|
-
pt2px: function(len){
|
|
919
|
-
// summary:
|
|
920
|
-
// converts points to pixels
|
|
921
|
-
// len: Number
|
|
922
|
-
// a value in points
|
|
923
|
-
return len * g.px_in_pt(); // Number
|
|
924
|
-
},
|
|
925
|
-
|
|
926
|
-
px2pt: function(len){
|
|
927
|
-
// summary:
|
|
928
|
-
// converts pixels to points
|
|
929
|
-
// len: Number
|
|
930
|
-
// a value in pixels
|
|
931
|
-
return len / g.px_in_pt(); // Number
|
|
932
|
-
},
|
|
933
|
-
|
|
934
|
-
normalizedLength: function(len) {
|
|
935
|
-
// summary:
|
|
936
|
-
// converts any length value to pixels
|
|
937
|
-
// len: String
|
|
938
|
-
// a length, e.g., '12pc'
|
|
939
|
-
// returns: Number
|
|
940
|
-
// pixels
|
|
941
|
-
if(len.length === 0){ return 0; }
|
|
942
|
-
if(len.length > 2){
|
|
943
|
-
var px_in_pt = g.px_in_pt();
|
|
944
|
-
var val = parseFloat(len);
|
|
945
|
-
switch(len.slice(-2)){
|
|
946
|
-
case "px": return val;
|
|
947
|
-
case "pt": return val * px_in_pt;
|
|
948
|
-
case "in": return val * 72 * px_in_pt;
|
|
949
|
-
case "pc": return val * 12 * px_in_pt;
|
|
950
|
-
case "mm": return val * g.mm_in_pt * px_in_pt;
|
|
951
|
-
case "cm": return val * g.cm_in_pt * px_in_pt;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
return parseFloat(len); // Number
|
|
955
|
-
},
|
|
956
|
-
|
|
957
|
-
// pathVmlRegExp: RegExp
|
|
958
|
-
// a constant regular expression used to split a SVG/VML path into primitive components
|
|
959
|
-
// tags:
|
|
960
|
-
// private
|
|
961
|
-
pathVmlRegExp: /([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,
|
|
962
|
-
|
|
963
|
-
// pathVmlRegExp: RegExp
|
|
964
|
-
// a constant regular expression used to split a SVG/VML path into primitive components
|
|
965
|
-
// tags:
|
|
966
|
-
// private
|
|
967
|
-
pathSvgRegExp: /([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,
|
|
968
|
-
|
|
969
|
-
equalSources: function(a, b){
|
|
970
|
-
// summary:
|
|
971
|
-
// compares event sources, returns true if they are equal
|
|
972
|
-
// a: Object
|
|
973
|
-
// first event source
|
|
974
|
-
// b: Object
|
|
975
|
-
// event source to compare against a
|
|
976
|
-
// returns: Boolean
|
|
977
|
-
// true, if objects are truthy and the same
|
|
978
|
-
return a && b && a === b;
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
switchTo: function(/*String|Object*/ renderer){
|
|
982
|
-
// summary:
|
|
983
|
-
// switch the graphics implementation to the specified renderer.
|
|
984
|
-
// renderer:
|
|
985
|
-
// Either the string name of a renderer (eg. 'canvas', 'svg, ...) or the renderer
|
|
986
|
-
// object to switch to.
|
|
987
|
-
var ns = typeof renderer == "string" ? g[renderer] : renderer;
|
|
988
|
-
if(ns){
|
|
989
|
-
// If more options are added, update the docblock at the end of shape.js!
|
|
990
|
-
arr.forEach(["Group", "Rect", "Ellipse", "Circle", "Line",
|
|
991
|
-
"Polyline", "Image", "Text", "Path", "TextPath",
|
|
992
|
-
"Surface", "createSurface", "fixTarget"], function(name){
|
|
993
|
-
g[name] = ns[name];
|
|
994
|
-
});
|
|
995
|
-
if(typeof renderer == "string"){
|
|
996
|
-
g.renderer = renderer;
|
|
997
|
-
}else{
|
|
998
|
-
arr.some(["svg","vml","canvas","canvasWithEvents","silverlight"], function(r){
|
|
999
|
-
return (g.renderer = g[r] && g[r].Surface === g.Surface ? r : null);
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
});
|
|
1005
|
-
|
|
1006
|
-
/*=====
|
|
1007
|
-
g.createSurface = function(parentNode, width, height){
|
|
1008
|
-
// summary:
|
|
1009
|
-
// creates a surface
|
|
1010
|
-
// parentNode: Node
|
|
1011
|
-
// a parent node
|
|
1012
|
-
// width: String|Number
|
|
1013
|
-
// width of surface, e.g., "100px" or 100
|
|
1014
|
-
// height: String|Number
|
|
1015
|
-
// height of surface, e.g., "100px" or 100
|
|
1016
|
-
// returns: dojox/gfx.Surface
|
|
1017
|
-
// newly created surface
|
|
1018
|
-
};
|
|
1019
|
-
g.fixTarget = function(){
|
|
1020
|
-
// tags:
|
|
1021
|
-
// private
|
|
1022
|
-
};
|
|
1023
|
-
=====*/
|
|
1024
|
-
|
|
1025
|
-
return g; // defaults object api
|
|
1026
|
-
});
|
|
1027
|
-
|
|
1028
|
-
},
|
|
1029
|
-
'dojox/gfx/renderer':function(){
|
|
1030
|
-
define(["./_base","dojo/_base/lang", "dojo/_base/sniff", "dojo/_base/window", "dojo/_base/config"],
|
|
1031
|
-
function(g, lang, has, win, config){
|
|
1032
|
-
//>> noBuildResolver
|
|
1033
|
-
var currentRenderer = null;
|
|
1034
|
-
|
|
1035
|
-
has.add("vml", function(global, document, element){
|
|
1036
|
-
element.innerHTML = "<v:shape adj=\"1\"/>";
|
|
1037
|
-
var supported = ("adj" in element.firstChild);
|
|
1038
|
-
element.innerHTML = "";
|
|
1039
|
-
return supported;
|
|
1040
|
-
});
|
|
1041
|
-
|
|
1042
|
-
return {
|
|
1043
|
-
// summary:
|
|
1044
|
-
// This module is an AMD loader plugin that loads the appropriate graphics renderer
|
|
1045
|
-
// implementation based on detected environment and current configuration settings.
|
|
1046
|
-
|
|
1047
|
-
load: function(id, require, load){
|
|
1048
|
-
// tags:
|
|
1049
|
-
// private
|
|
1050
|
-
if(currentRenderer && id != "force"){
|
|
1051
|
-
load(currentRenderer);
|
|
1052
|
-
return;
|
|
1053
|
-
}
|
|
1054
|
-
var renderer = config.forceGfxRenderer,
|
|
1055
|
-
renderers = !renderer && (lang.isString(config.gfxRenderer) ?
|
|
1056
|
-
config.gfxRenderer : "svg,vml,canvas,silverlight").split(","),
|
|
1057
|
-
silverlightObject, silverlightFlag;
|
|
1058
|
-
|
|
1059
|
-
while(!renderer && renderers.length){
|
|
1060
|
-
switch(renderers.shift()){
|
|
1061
|
-
case "svg":
|
|
1062
|
-
// the next test is from https://github.com/phiggins42/has.js
|
|
1063
|
-
if("SVGAngle" in win.global){
|
|
1064
|
-
renderer = "svg";
|
|
1065
|
-
}
|
|
1066
|
-
break;
|
|
1067
|
-
case "vml":
|
|
1068
|
-
if(has("vml")){
|
|
1069
|
-
renderer = "vml";
|
|
1070
|
-
}
|
|
1071
|
-
break;
|
|
1072
|
-
case "silverlight":
|
|
1073
|
-
try{
|
|
1074
|
-
if(has("ie")){
|
|
1075
|
-
silverlightObject = new ActiveXObject("AgControl.AgControl");
|
|
1076
|
-
if(silverlightObject && silverlightObject.IsVersionSupported("1.0")){
|
|
1077
|
-
silverlightFlag = true;
|
|
1078
|
-
}
|
|
1079
|
-
}else{
|
|
1080
|
-
if(navigator.plugins["Silverlight Plug-In"]){
|
|
1081
|
-
silverlightFlag = true;
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
}catch(e){
|
|
1085
|
-
silverlightFlag = false;
|
|
1086
|
-
}finally{
|
|
1087
|
-
silverlightObject = null;
|
|
1088
|
-
}
|
|
1089
|
-
if(silverlightFlag){
|
|
1090
|
-
renderer = "silverlight";
|
|
1091
|
-
}
|
|
1092
|
-
break;
|
|
1093
|
-
case "canvas":
|
|
1094
|
-
if(win.global.CanvasRenderingContext2D){
|
|
1095
|
-
renderer = "canvas";
|
|
1096
|
-
}
|
|
1097
|
-
break;
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
if (renderer === 'canvas' && config.canvasEvents !== false) {
|
|
1102
|
-
renderer = "canvasWithEvents";
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
if(config.isDebug){
|
|
1106
|
-
console.log("gfx renderer = " + renderer);
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
function loadRenderer(){
|
|
1110
|
-
require(["dojox/gfx/" + renderer], function(module){
|
|
1111
|
-
g.renderer = renderer;
|
|
1112
|
-
// memorize the renderer module
|
|
1113
|
-
currentRenderer = module;
|
|
1114
|
-
// now load it
|
|
1115
|
-
load(module);
|
|
1116
|
-
});
|
|
1117
|
-
}
|
|
1118
|
-
if(renderer == "svg" && typeof window.svgweb != "undefined"){
|
|
1119
|
-
window.svgweb.addOnLoad(loadRenderer);
|
|
1120
|
-
}else{
|
|
1121
|
-
loadRenderer();
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
};
|
|
1125
|
-
});
|
|
1126
|
-
|
|
1127
|
-
}}});
|
|
1128
|
-
define("dojox/gfx", ["dojo/_base/lang", "./gfx/_base", "./gfx/renderer!"],
|
|
1129
|
-
function(lang, gfxBase, renderer){
|
|
1130
|
-
// module:
|
|
1131
|
-
// dojox/gfx
|
|
1132
|
-
// summary:
|
|
1133
|
-
// This the root of the Dojo Graphics package
|
|
1134
|
-
gfxBase.switchTo(renderer);
|
|
1135
|
-
return gfxBase;
|
|
1136
|
-
});
|