@progress/kendo-charts 2.7.2-dev.202502101310 → 2.7.2-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/barcode/barcode-validator.js +10 -12
- package/dist/es/barcode/barcode.js +84 -96
- package/dist/es/barcode/encodings/code11.js +41 -57
- package/dist/es/barcode/encodings/code128.js +222 -354
- package/dist/es/barcode/encodings/code39-extended.js +20 -34
- package/dist/es/barcode/encodings/code39.js +49 -75
- package/dist/es/barcode/encodings/code93-extended.js +12 -24
- package/dist/es/barcode/encodings/code93.js +52 -70
- package/dist/es/barcode/encodings/ean13.js +28 -42
- package/dist/es/barcode/encodings/ean8.js +8 -18
- package/dist/es/barcode/encodings/encoding.js +18 -24
- package/dist/es/barcode/encodings/main.js +13 -10
- package/dist/es/barcode/encodings/msi.js +56 -112
- package/dist/es/barcode/encodings/postnet.js +31 -45
- package/dist/es/barcode/surface-size.js +2 -2
- package/dist/es/chart/aggregates/aggregates.js +23 -23
- package/dist/es/chart/aggregates/default-aggregates.js +10 -18
- package/dist/es/chart/aggregates/series-aggregator.js +42 -54
- package/dist/es/chart/animations/bar-chart-animation.js +15 -26
- package/dist/es/chart/animations/bubble-animation.js +7 -17
- package/dist/es/chart/animations/clip-animation.js +13 -23
- package/dist/es/chart/animations/fade-in-animation.js +6 -16
- package/dist/es/chart/animations/pie-animation.js +6 -16
- package/dist/es/chart/api-elements/chart-axis.js +14 -22
- package/dist/es/chart/api-elements/chart-pane.js +10 -8
- package/dist/es/chart/api-elements/chart-plotarea.js +4 -10
- package/dist/es/chart/api-elements/find-axis-by-name.js +1 -1
- package/dist/es/chart/area-chart/area-chart.js +46 -60
- package/dist/es/chart/area-chart/area-segment.js +46 -52
- package/dist/es/chart/area-chart/spline-area-segment.js +12 -21
- package/dist/es/chart/area-chart/step-area-segment.js +6 -15
- package/dist/es/chart/axis-group-range-tracker.js +14 -20
- package/dist/es/chart/bar-chart/bar-chart.js +65 -80
- package/dist/es/chart/bar-chart/bar-label.js +25 -32
- package/dist/es/chart/bar-chart/bar.js +76 -91
- package/dist/es/chart/box-plot-chart/box-plot-chart.js +33 -48
- package/dist/es/chart/box-plot-chart/box-plot.js +55 -68
- package/dist/es/chart/box-plot-chart/vertical-box-plot.js +13 -23
- package/dist/es/chart/bubble-chart/bubble-chart.js +51 -64
- package/dist/es/chart/bubble-chart/bubble.js +21 -27
- package/dist/es/chart/bullet-chart/bullet-chart.js +45 -57
- package/dist/es/chart/bullet-chart/bullet.js +48 -57
- package/dist/es/chart/bullet-chart/target.js +1 -11
- package/dist/es/chart/candlestick-chart/candlestick-chart.js +41 -55
- package/dist/es/chart/candlestick-chart/candlestick.js +60 -69
- package/dist/es/chart/categorical-chart.js +178 -206
- package/dist/es/chart/chart-container.js +30 -39
- package/dist/es/chart/chart.js +641 -701
- package/dist/es/chart/constants.js +103 -103
- package/dist/es/chart/crosshair/crosshair-tooltip.js +22 -34
- package/dist/es/chart/crosshair/crosshair.js +39 -47
- package/dist/es/chart/donut-chart/donut-chart.js +36 -48
- package/dist/es/chart/donut-chart/donut-segment.js +12 -24
- package/dist/es/chart/error-bars/categorical-error-bar.js +5 -15
- package/dist/es/chart/error-bars/error-bar-base.js +37 -49
- package/dist/es/chart/error-bars/error-range-calculator.js +46 -56
- package/dist/es/chart/error-bars/scatter-error-bar.js +6 -16
- package/dist/es/chart/funnel-chart/funnel-chart.js +86 -103
- package/dist/es/chart/funnel-chart/funnel-segment.js +46 -54
- package/dist/es/chart/funnel-chart/pyramid-chart.js +5 -11
- package/dist/es/chart/heatmap-chart/color-scale.js +7 -9
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +87 -110
- package/dist/es/chart/heatmap-chart/heatmap-point.js +72 -78
- package/dist/es/chart/highlight.js +26 -36
- package/dist/es/chart/layout/cluster-layout.js +16 -25
- package/dist/es/chart/layout/radar-cluster-layout.js +15 -24
- package/dist/es/chart/layout/radar-stack-layout.js +10 -22
- package/dist/es/chart/layout/stack-wrap.js +12 -24
- package/dist/es/chart/layout/utils.js +2 -2
- package/dist/es/chart/legend/legend-item-line-area.js +8 -19
- package/dist/es/chart/legend/legend-item-line.js +21 -31
- package/dist/es/chart/legend/legend-item-marker.js +18 -28
- package/dist/es/chart/legend/legend-item-square.js +8 -18
- package/dist/es/chart/legend/legend-item.js +91 -105
- package/dist/es/chart/legend/legend-layout.js +18 -25
- package/dist/es/chart/legend/legend.js +68 -92
- package/dist/es/chart/line-chart/line-chart.js +35 -48
- package/dist/es/chart/line-chart/line-point.js +90 -103
- package/dist/es/chart/line-chart/line-segment.js +23 -34
- package/dist/es/chart/line-chart/spline-segment.js +10 -20
- package/dist/es/chart/line-chart/step-line-mixin.js +14 -17
- package/dist/es/chart/line-chart/step-line-segment.js +4 -14
- package/dist/es/chart/mixins/accessibility-attributes-mixin.js +7 -7
- package/dist/es/chart/mixins/clip-animation-mixin.js +7 -7
- package/dist/es/chart/mixins/line-chart-mixin.js +27 -31
- package/dist/es/chart/mixins/note-mixin.js +3 -3
- package/dist/es/chart/mixins/pie-chart-mixin.js +9 -9
- package/dist/es/chart/mixins/plotarea-events-mixin.js +1 -1
- package/dist/es/chart/mixins/point-events-mixin.js +1 -1
- package/dist/es/chart/ohlc-chart/ohlc-chart.js +4 -14
- package/dist/es/chart/ohlc-chart/ohlc-point.js +15 -28
- package/dist/es/chart/pan-and-zoom/accept-key.js +3 -3
- package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +25 -33
- package/dist/es/chart/pan-and-zoom/pannable.js +29 -37
- package/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js +3 -3
- package/dist/es/chart/pan-and-zoom/zoom-selection.js +61 -70
- package/dist/es/chart/pane.js +71 -79
- package/dist/es/chart/pie-chart/pie-chart.js +153 -183
- package/dist/es/chart/pie-chart/pie-segment.js +82 -98
- package/dist/es/chart/plotarea/categorical-plotarea.js +285 -318
- package/dist/es/chart/plotarea/donut-plotarea.js +12 -22
- package/dist/es/chart/plotarea/funnel-plotarea.js +17 -27
- package/dist/es/chart/plotarea/heatmap-plotarea.js +139 -167
- package/dist/es/chart/plotarea/pie-plotarea.js +15 -25
- package/dist/es/chart/plotarea/plotarea-base.js +423 -462
- package/dist/es/chart/plotarea/plotarea-factory.js +15 -20
- package/dist/es/chart/plotarea/polar-plotarea-base.js +37 -51
- package/dist/es/chart/plotarea/polar-plotarea.js +39 -49
- package/dist/es/chart/plotarea/radar-plotarea.js +55 -65
- package/dist/es/chart/plotarea/xy-plotarea.js +111 -128
- package/dist/es/chart/polar-area-chart/polar-area-chart.js +22 -36
- package/dist/es/chart/polar-area-chart/polar-area-segment.js +7 -17
- package/dist/es/chart/polar-area-chart/spline-polar-area-segment.js +15 -25
- package/dist/es/chart/polar-line-chart/polar-line-chart.js +2 -11
- package/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js +6 -16
- package/dist/es/chart/radar-area-chart/radar-area-chart.js +11 -21
- package/dist/es/chart/radar-area-chart/radar-area-segment.js +3 -13
- package/dist/es/chart/radar-area-chart/spline-radar-area-segment.js +3 -13
- package/dist/es/chart/radar-bar-chart/radar-bar-chart.js +19 -29
- package/dist/es/chart/radar-bar-chart/radar-segment.js +6 -12
- package/dist/es/chart/radar-line-chart/radar-line-chart.js +26 -35
- package/dist/es/chart/range-area-chart/range-area-chart.js +46 -58
- package/dist/es/chart/range-area-chart/range-area-point.js +55 -66
- package/dist/es/chart/range-area-chart/range-area-segment.js +19 -28
- package/dist/es/chart/range-area-chart/range-line-point.js +4 -14
- package/dist/es/chart/range-area-chart/spline-range-area-segment.js +11 -18
- package/dist/es/chart/range-area-chart/step-range-area-segment.js +7 -16
- package/dist/es/chart/range-bar-chart/range-bar-chart.js +18 -29
- package/dist/es/chart/range-bar-chart/range-bar.js +10 -23
- package/dist/es/chart/register-charts.js +20 -16
- package/dist/es/chart/scatter-charts/scatter-chart.js +100 -122
- package/dist/es/chart/scatter-charts/scatter-line-chart.js +15 -25
- package/dist/es/chart/selection.js +176 -201
- package/dist/es/chart/series-binder.js +55 -66
- package/dist/es/chart/theme/base-theme.js +75 -79
- package/dist/es/chart/theme/load-theme.js +52 -52
- package/dist/es/chart/tooltip/base-tooltip.js +17 -24
- package/dist/es/chart/tooltip/shared-tooltip.js +25 -31
- package/dist/es/chart/tooltip/tooltip.js +10 -20
- package/dist/es/chart/trendlines/calculate-moving-average.js +11 -13
- package/dist/es/chart/trendlines/calculate-polynomial.js +24 -26
- package/dist/es/chart/trendlines/calculate-slope.js +12 -14
- package/dist/es/chart/trendlines/check-all-positive.js +2 -5
- package/dist/es/chart/trendlines/exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/get-scatter-trendline-data.js +6 -7
- package/dist/es/chart/trendlines/get-trendline-data.js +6 -6
- package/dist/es/chart/trendlines/linear-trendline.js +12 -21
- package/dist/es/chart/trendlines/logarithmic-trendline.js +14 -23
- package/dist/es/chart/trendlines/moving-average.js +15 -26
- package/dist/es/chart/trendlines/polynomial-trendline.js +13 -21
- package/dist/es/chart/trendlines/power-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-linear-trendline.js +10 -16
- package/dist/es/chart/trendlines/scatter-logarithmic-trendline.js +17 -27
- package/dist/es/chart/trendlines/scatter-moving-average.js +7 -10
- package/dist/es/chart/trendlines/scatter-polynomial-trendline.js +11 -16
- package/dist/es/chart/trendlines/scatter-power-trendline.js +15 -22
- package/dist/es/chart/trendlines/scatter-trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/scatter-value-getter.js +2 -5
- package/dist/es/chart/trendlines/trendline-factory.js +1 -1
- package/dist/es/chart/trendlines/trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/x-value-limits.js +6 -8
- package/dist/es/chart/utils/any-has-z-index.js +1 -1
- package/dist/es/chart/utils/bind-segments.js +8 -8
- package/dist/es/chart/utils/categories-count.js +3 -3
- package/dist/es/chart/utils/count-numbers.js +4 -4
- package/dist/es/chart/utils/create-out-of-range-points.js +13 -22
- package/dist/es/chart/utils/eval-options.js +7 -10
- package/dist/es/chart/utils/filter-series-by-type.js +4 -4
- package/dist/es/chart/utils/get-field.js +1 -1
- package/dist/es/chart/utils/has-gradient-overlay.js +1 -1
- package/dist/es/chart/utils/is-date-axis.js +2 -2
- package/dist/es/chart/utils/parse-date-category.js +2 -2
- package/dist/es/chart/utils/segment-visible.js +2 -2
- package/dist/es/chart/waterfall-chart/waterfall-chart.js +41 -55
- package/dist/es/chart/waterfall-chart/waterfall-segment.js +16 -24
- package/dist/es/chart-wizard/get-wizard-data-from-data-rows.js +5 -6
- package/dist/es/chart-wizard/messages.js +1 -1
- package/dist/es/chart-wizard/state.js +145 -137
- package/dist/es/chart-wizard.js +12 -12
- package/dist/es/common/add-class.js +3 -3
- package/dist/es/common/align-path-to-pixel.js +2 -2
- package/dist/es/common/auto-text-color.js +1 -1
- package/dist/es/common/constants.js +53 -53
- package/dist/es/common/create-hash-set.js +59 -65
- package/dist/es/common/cycleDown.js +1 -1
- package/dist/es/common/deep-extend.js +10 -12
- package/dist/es/common/element-scale.js +9 -9
- package/dist/es/common/element-styles.js +8 -8
- package/dist/es/common/event-map.js +4 -4
- package/dist/es/common/event-utils.js +13 -13
- package/dist/es/common/find.js +2 -2
- package/dist/es/common/font-loader.js +42 -44
- package/dist/es/common/get-aria-template.js +2 -4
- package/dist/es/common/get-spacing.js +2 -4
- package/dist/es/common/get-supported-features.js +7 -7
- package/dist/es/common/get-template.js +2 -4
- package/dist/es/common/getter.js +5 -5
- package/dist/es/common/grep.js +3 -3
- package/dist/es/common/has-classes.js +2 -2
- package/dist/es/common/hash-map.js +11 -11
- package/dist/es/common/instance-observer.js +28 -33
- package/dist/es/common/keys.js +1 -1
- package/dist/es/common/map.js +4 -4
- package/dist/es/common/matrix.js +142 -150
- package/dist/es/common/mousewheel-delta.js +2 -2
- package/dist/es/common/observable.js +40 -52
- package/dist/es/common/remove-class.js +1 -1
- package/dist/es/common/render-icon.js +50 -60
- package/dist/es/common/set-default-options.js +1 -1
- package/dist/es/common/sparse-array-limits.js +4 -4
- package/dist/es/common/user-events.js +124 -150
- package/dist/es/core/axis-label.js +38 -43
- package/dist/es/core/axis.js +293 -345
- package/dist/es/core/box-element.js +36 -46
- package/dist/es/core/box.js +75 -83
- package/dist/es/core/category-axis.js +265 -314
- package/dist/es/core/chart-element.js +98 -109
- package/dist/es/core/constants.js +3 -3
- package/dist/es/core/curve-processor.js +86 -93
- package/dist/es/core/date-category-axis.js +381 -413
- package/dist/es/core/date-value-axis.js +108 -118
- package/dist/es/core/float-element.js +54 -78
- package/dist/es/core/gradients.js +3 -3
- package/dist/es/core/logarithmic-axis.js +134 -186
- package/dist/es/core/mixins/grid-lines-mixin.js +18 -20
- package/dist/es/core/mixins/radar-numeric-axis-mixin.js +46 -51
- package/dist/es/core/note.js +58 -73
- package/dist/es/core/numeric-axis.js +111 -133
- package/dist/es/core/pattern.js +4 -8
- package/dist/es/core/point.js +25 -34
- package/dist/es/core/polar-axis.js +73 -91
- package/dist/es/core/radar-category-axis.js +90 -114
- package/dist/es/core/radar-logarithmic-axis.js +10 -20
- package/dist/es/core/radar-numeric-axis.js +10 -20
- package/dist/es/core/ring.js +61 -68
- package/dist/es/core/root-element.js +40 -48
- package/dist/es/core/sector.js +11 -17
- package/dist/es/core/shape-builder.js +13 -23
- package/dist/es/core/shape-element.js +27 -37
- package/dist/es/core/text-box.js +50 -59
- package/dist/es/core/text.js +13 -24
- package/dist/es/core/title.js +19 -25
- package/dist/es/core/utils/auto-axis-max.js +3 -3
- package/dist/es/core/utils/auto-axis-min.js +3 -3
- package/dist/es/core/utils/auto-major-unit.js +4 -4
- package/dist/es/core/utils/box-diff.js +9 -9
- package/dist/es/core/utils/create-axis-grid-line.js +2 -4
- package/dist/es/core/utils/create-axis-tick.js +2 -4
- package/dist/es/core/utils/guid.js +3 -3
- package/dist/es/core/utils/rect-to-box.js +2 -2
- package/dist/es/date-utils/absolute-date-diff.js +2 -2
- package/dist/es/date-utils/add-duration.js +5 -5
- package/dist/es/date-utils/ceil-date.js +1 -1
- package/dist/es/date-utils/constants.js +17 -17
- package/dist/es/date-utils/date-index.js +3 -3
- package/dist/es/date-utils/duration.js +1 -1
- package/dist/es/date-utils/lte-date-index.js +4 -4
- package/dist/es/date-utils/parse-date.js +1 -1
- package/dist/es/date-utils/parse-dates.js +2 -2
- package/dist/es/date-utils/start-of-week.js +3 -5
- package/dist/es/date-utils/to-date.js +1 -1
- package/dist/es/date-utils/to-time.js +2 -2
- package/dist/es/drawing-utils.js +18 -17
- package/dist/es/gauges/arc/arc-gauge.js +29 -38
- package/dist/es/gauges/arc/arc-scale.js +16 -29
- package/dist/es/gauges/arc/range-pointer-animation.js +16 -25
- package/dist/es/gauges/arc/range-pointer.js +25 -46
- package/dist/es/gauges/circular/circular-gauge.js +7 -17
- package/dist/es/gauges/constants.js +14 -14
- package/dist/es/gauges/gauge.js +84 -96
- package/dist/es/gauges/linear/arrow-linear-pointer-animation.js +13 -25
- package/dist/es/gauges/linear/arrow-linear-pointer.js +23 -35
- package/dist/es/gauges/linear/bar-linear-pointer-animation.js +15 -24
- package/dist/es/gauges/linear/bar-linear-pointer.js +38 -51
- package/dist/es/gauges/linear/linear-gauge.js +61 -83
- package/dist/es/gauges/linear/linear-pointer.js +25 -39
- package/dist/es/gauges/linear/linear-scale.js +57 -74
- package/dist/es/gauges/pointer.js +11 -21
- package/dist/es/gauges/radial/radial-gauge.js +58 -81
- package/dist/es/gauges/radial/radial-pointer-animation.js +9 -15
- package/dist/es/gauges/radial/radial-pointer.js +33 -48
- package/dist/es/gauges/radial/radial-scale.js +154 -186
- package/dist/es/gauges/utils/build-label-element.js +10 -12
- package/dist/es/gauges/utils/get-range.js +2 -2
- package/dist/es/gauges/utils/pad.js +3 -3
- package/dist/es/gauges/utils/unpad.js +1 -1
- package/dist/es/map/attribution.js +42 -52
- package/dist/es/map/constants.js +5 -5
- package/dist/es/map/crs.js +68 -112
- package/dist/es/map/datums.js +3 -3
- package/dist/es/map/extent.js +40 -54
- package/dist/es/map/layers/bubble.js +52 -70
- package/dist/es/map/layers/layer.js +50 -56
- package/dist/es/map/layers/marker.js +109 -129
- package/dist/es/map/layers/shape.js +111 -133
- package/dist/es/map/layers/tile.js +144 -170
- package/dist/es/map/location.js +70 -78
- package/dist/es/map/map.js +261 -291
- package/dist/es/map/navigator.js +33 -39
- package/dist/es/map/scroller/draggable.js +98 -134
- package/dist/es/map/scroller/fx.js +39 -46
- package/dist/es/map/scroller/scroller.js +144 -174
- package/dist/es/map/tooltip/tooltip.js +15 -25
- package/dist/es/map/utils.js +25 -26
- package/dist/es/map/zoom.js +30 -36
- package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +14 -26
- package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +15 -25
- package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +8 -7
- package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +14 -24
- package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +15 -21
- package/dist/es/qrcode/encodings/encoders/iso-encoder.js +6 -16
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +28 -36
- package/dist/es/qrcode/encodings/encoding-result.js +4 -10
- package/dist/es/qrcode/encodings/encoding.js +68 -192
- package/dist/es/qrcode/encodings/free-cell-visitor.js +16 -24
- package/dist/es/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es/qrcode/encodings/utils/index.js +5 -0
- package/dist/es/qrcode/encodings/version-codewords.js +1 -1
- package/dist/es/qrcode/qrcode-validator.js +3 -5
- package/dist/es/qrcode/qrcode.js +104 -114
- package/dist/es/qrcode/utils.js +4 -4
- package/dist/es/sankey/calculation.js +286 -307
- package/dist/es/sankey/element.js +15 -23
- package/dist/es/sankey/label.js +29 -44
- package/dist/es/sankey/legend.js +15 -29
- package/dist/es/sankey/link.js +80 -98
- package/dist/es/sankey/node.js +26 -37
- package/dist/es/sankey/sankey.js +318 -385
- package/dist/es/sankey/title.js +9 -20
- package/dist/es/sankey/utils.js +18 -23
- package/dist/es/services/chart-service.js +24 -28
- package/dist/es/services/dom-events-builder.js +15 -15
- package/dist/es/services/format-service.js +30 -35
- package/dist/es/services/intl-service.js +14 -18
- package/dist/es/services/map-service.js +11 -11
- package/dist/es/services/template-service.js +9 -9
- package/dist/es/sparkline/shared-tooltip.js +11 -21
- package/dist/es/sparkline/sparkline.js +50 -60
- package/dist/es/stock/constants.js +3 -3
- package/dist/es/stock/fade-out-animation.js +12 -21
- package/dist/es/stock/navigator-hint.js +37 -49
- package/dist/es/stock/navigator.js +130 -161
- package/dist/es/stock/stock-chart.js +58 -67
- package/dist/es2015/chart/legend/legend-item.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoding.js +3 -127
- package/dist/es2015/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es2015/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es2015/qrcode/encodings/utils/index.js +5 -0
- package/dist/npm/main.js +3222 -3589
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +19 -57
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
TapCapture
|
|
35
35
|
} from './draggable';
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
let
|
|
38
38
|
extend = Object.assign,
|
|
39
39
|
abs = Math.abs,
|
|
40
40
|
SNAPBACK_DURATION = 500,
|
|
@@ -52,52 +52,46 @@ var
|
|
|
52
52
|
SCROLL = 'scroll',
|
|
53
53
|
MOUSE_WHEEL_ID = 2;
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
class ZoomSnapBack extends Animation {
|
|
56
|
+
constructor(options) {
|
|
57
|
+
super(options);
|
|
58
|
+
let that = this;
|
|
59
59
|
extend(that, options);
|
|
60
60
|
that.userEvents.bind('gestureend', that.start.bind(this));
|
|
61
61
|
that.tapCapture.bind('press', that.cancel.bind(this));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
ZoomSnapBack.prototype = Object.create( Animation && Animation.prototype );
|
|
66
|
-
ZoomSnapBack.prototype.constructor = ZoomSnapBack;
|
|
67
|
-
|
|
68
|
-
ZoomSnapBack.prototype.enabled = function enabled () {
|
|
64
|
+
enabled() {
|
|
69
65
|
return this.movable.scale < this.dimensions.minScale;
|
|
70
|
-
}
|
|
66
|
+
}
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
done() {
|
|
73
69
|
return this.dimensions.minScale - this.movable.scale < 0.01;
|
|
74
|
-
}
|
|
70
|
+
}
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
tick() {
|
|
73
|
+
let movable = this.movable;
|
|
78
74
|
movable.scaleWith(1.1);
|
|
79
75
|
this.dimensions.rescale(movable.scale);
|
|
80
|
-
}
|
|
76
|
+
}
|
|
81
77
|
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
onEnd() {
|
|
79
|
+
let movable = this.movable;
|
|
84
80
|
movable.scaleTo(this.dimensions.minScale);
|
|
85
81
|
this.dimensions.rescale(movable.scale);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return ZoomSnapBack;
|
|
89
|
-
}(Animation));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
90
84
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
class DragInertia extends Animation {
|
|
86
|
+
constructor(options) {
|
|
87
|
+
super();
|
|
88
|
+
let that = this;
|
|
95
89
|
|
|
96
90
|
extend(that, options, {
|
|
97
91
|
transition: new Transition({
|
|
98
92
|
axis: options.axis,
|
|
99
93
|
movable: options.movable,
|
|
100
|
-
onEnd
|
|
94
|
+
onEnd() {
|
|
101
95
|
that._end();
|
|
102
96
|
}
|
|
103
97
|
})
|
|
@@ -112,35 +106,31 @@ var DragInertia = (function (Animation) {
|
|
|
112
106
|
that.userEvents.bind('tap', proxy(that.onEnd, that));
|
|
113
107
|
}
|
|
114
108
|
|
|
115
|
-
|
|
116
|
-
DragInertia.prototype = Object.create( Animation && Animation.prototype );
|
|
117
|
-
DragInertia.prototype.constructor = DragInertia;
|
|
118
|
-
|
|
119
|
-
DragInertia.prototype.onCancel = function onCancel () {
|
|
109
|
+
onCancel() {
|
|
120
110
|
this.transition.cancel();
|
|
121
|
-
}
|
|
111
|
+
}
|
|
122
112
|
|
|
123
|
-
|
|
124
|
-
|
|
113
|
+
freeze(location) {
|
|
114
|
+
let that = this;
|
|
125
115
|
that.cancel();
|
|
126
116
|
that._moveTo(location);
|
|
127
|
-
}
|
|
117
|
+
}
|
|
128
118
|
|
|
129
|
-
|
|
130
|
-
|
|
119
|
+
onEnd() {
|
|
120
|
+
let that = this;
|
|
131
121
|
if (that.paneAxis.outOfBounds()) {
|
|
132
122
|
that._snapBack();
|
|
133
123
|
} else {
|
|
134
124
|
that._end();
|
|
135
125
|
}
|
|
136
|
-
}
|
|
126
|
+
}
|
|
137
127
|
|
|
138
|
-
|
|
128
|
+
done() {
|
|
139
129
|
return abs(this.velocity) < 1;
|
|
140
|
-
}
|
|
130
|
+
}
|
|
141
131
|
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
start(e) {
|
|
133
|
+
let that = this,
|
|
144
134
|
velocity;
|
|
145
135
|
if (!that.dimension.enabled) {
|
|
146
136
|
return;
|
|
@@ -149,7 +139,7 @@ var DragInertia = (function (Animation) {
|
|
|
149
139
|
if (that.transition._started) {
|
|
150
140
|
that.transition.cancel();
|
|
151
141
|
that.velocity = Math.min(e.touch[that.axis].velocity * that.velocityMultiplier, MAX_VELOCITY);
|
|
152
|
-
|
|
142
|
+
super.start();
|
|
153
143
|
} else {
|
|
154
144
|
that._snapBack();
|
|
155
145
|
}
|
|
@@ -157,12 +147,12 @@ var DragInertia = (function (Animation) {
|
|
|
157
147
|
velocity = e.touch.id === MOUSE_WHEEL_ID ? 0 : e.touch[that.axis].velocity;
|
|
158
148
|
that.velocity = Math.max(Math.min(velocity * that.velocityMultiplier, MAX_VELOCITY), -MAX_VELOCITY);
|
|
159
149
|
that.tapCapture.captureNext();
|
|
160
|
-
|
|
150
|
+
super.start();
|
|
161
151
|
}
|
|
162
|
-
}
|
|
152
|
+
}
|
|
163
153
|
|
|
164
|
-
|
|
165
|
-
|
|
154
|
+
tick() {
|
|
155
|
+
let that = this,
|
|
166
156
|
dimension = that.dimension,
|
|
167
157
|
friction = that.paneAxis.outOfBounds() ? OUT_OF_BOUNDS_FRICTION : that.friction,
|
|
168
158
|
delta = that.velocity *= friction,
|
|
@@ -174,36 +164,34 @@ var DragInertia = (function (Animation) {
|
|
|
174
164
|
}
|
|
175
165
|
|
|
176
166
|
that.movable.moveAxis(that.axis, location);
|
|
177
|
-
}
|
|
167
|
+
}
|
|
178
168
|
|
|
179
|
-
|
|
169
|
+
_end() {
|
|
180
170
|
this.tapCapture.cancelCapture();
|
|
181
171
|
this.end();
|
|
182
|
-
}
|
|
172
|
+
}
|
|
183
173
|
|
|
184
|
-
|
|
185
|
-
|
|
174
|
+
_snapBack() {
|
|
175
|
+
let that = this,
|
|
186
176
|
dimension = that.dimension,
|
|
187
177
|
snapBack = that.movable[that.axis] > dimension.max ? dimension.max : dimension.min;
|
|
188
178
|
|
|
189
179
|
that._moveTo(snapBack);
|
|
190
|
-
}
|
|
180
|
+
}
|
|
191
181
|
|
|
192
|
-
|
|
182
|
+
_moveTo(location) {
|
|
193
183
|
this.transition.moveTo({
|
|
194
184
|
location: location,
|
|
195
185
|
duration: SNAPBACK_DURATION,
|
|
196
186
|
ease: Transition.easeOutExpo
|
|
197
187
|
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return DragInertia;
|
|
201
|
-
}(Animation));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
202
190
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
191
|
+
class AnimatedScroller extends Animation {
|
|
192
|
+
constructor(options) {
|
|
193
|
+
super(options);
|
|
194
|
+
let that = this;
|
|
207
195
|
|
|
208
196
|
extend(that, options, {
|
|
209
197
|
origin: {},
|
|
@@ -212,43 +200,39 @@ var AnimatedScroller = (function (Animation) {
|
|
|
212
200
|
});
|
|
213
201
|
}
|
|
214
202
|
|
|
215
|
-
|
|
216
|
-
AnimatedScroller.prototype = Object.create( Animation && Animation.prototype );
|
|
217
|
-
AnimatedScroller.prototype.constructor = AnimatedScroller;
|
|
218
|
-
|
|
219
|
-
AnimatedScroller.prototype.tick = function tick () {
|
|
203
|
+
tick() {
|
|
220
204
|
this._updateCoordinates();
|
|
221
205
|
this.moveTo(this.origin);
|
|
222
|
-
}
|
|
206
|
+
}
|
|
223
207
|
|
|
224
|
-
|
|
208
|
+
done() {
|
|
225
209
|
return abs(this.offset.y) < ANIMATED_SCROLLER_PRECISION && abs(this.offset.x) < ANIMATED_SCROLLER_PRECISION;
|
|
226
|
-
}
|
|
210
|
+
}
|
|
227
211
|
|
|
228
|
-
|
|
212
|
+
onEnd() {
|
|
229
213
|
this.moveTo(this.destination);
|
|
230
214
|
if (this.callback) {
|
|
231
215
|
this.callback.call();
|
|
232
216
|
}
|
|
233
|
-
}
|
|
217
|
+
}
|
|
234
218
|
|
|
235
|
-
|
|
219
|
+
setCoordinates(from, to) {
|
|
236
220
|
this.offset = {};
|
|
237
221
|
this.origin = from;
|
|
238
222
|
this.destination = to;
|
|
239
|
-
}
|
|
223
|
+
}
|
|
240
224
|
|
|
241
225
|
/* eslint-disable no-param-reassign */
|
|
242
|
-
|
|
226
|
+
setCallback(callback) {
|
|
243
227
|
if (callback && isFunction(callback)) {
|
|
244
228
|
this.callback = callback;
|
|
245
229
|
} else {
|
|
246
230
|
callback = undefined;
|
|
247
231
|
}
|
|
248
|
-
}
|
|
232
|
+
}
|
|
249
233
|
/* eslint-enable no-param-reassign */
|
|
250
234
|
|
|
251
|
-
|
|
235
|
+
_updateCoordinates() {
|
|
252
236
|
this.offset = {
|
|
253
237
|
x: (this.destination.x - this.origin.x) / 4,
|
|
254
238
|
y: (this.destination.y - this.origin.y) / 4
|
|
@@ -257,19 +241,17 @@ var AnimatedScroller = (function (Animation) {
|
|
|
257
241
|
y: this.origin.y + this.offset.y,
|
|
258
242
|
x: this.origin.x + this.offset.x
|
|
259
243
|
};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
return AnimatedScroller;
|
|
263
|
-
}(Animation));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
264
246
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
247
|
+
class ScrollBar extends Class {
|
|
248
|
+
constructor(options) {
|
|
249
|
+
super();
|
|
250
|
+
let that = this,
|
|
269
251
|
horizontal = options.axis === 'x';
|
|
270
252
|
|
|
271
|
-
|
|
272
|
-
|
|
253
|
+
const orientation = (horizontal ? 'horizontal' : 'vertical');
|
|
254
|
+
const element = convertToHtml('<div class="km-touch-scrollbar km-' + orientation + '-scrollbar" />');
|
|
273
255
|
|
|
274
256
|
extend(that, options, {
|
|
275
257
|
element: element,
|
|
@@ -289,12 +271,8 @@ var ScrollBar = (function (Class) {
|
|
|
289
271
|
}
|
|
290
272
|
}
|
|
291
273
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
ScrollBar.prototype.constructor = ScrollBar;
|
|
295
|
-
|
|
296
|
-
ScrollBar.prototype.refresh = function refresh () {
|
|
297
|
-
var that = this,
|
|
274
|
+
refresh() {
|
|
275
|
+
let that = this,
|
|
298
276
|
axis = that.axis,
|
|
299
277
|
dimension = that.dimension,
|
|
300
278
|
paneSize = dimension.size,
|
|
@@ -318,34 +296,32 @@ var ScrollBar = (function (Class) {
|
|
|
318
296
|
that.elementSize = size;
|
|
319
297
|
}
|
|
320
298
|
that.movable.moveAxis(axis, position);
|
|
321
|
-
}
|
|
299
|
+
}
|
|
322
300
|
|
|
323
|
-
|
|
301
|
+
show() {
|
|
324
302
|
this.element.style.opacity = SCROLLBAR_OPACITY;
|
|
325
303
|
this.element.style.visibility = "visible";
|
|
326
|
-
}
|
|
304
|
+
}
|
|
327
305
|
|
|
328
|
-
|
|
306
|
+
hide() {
|
|
329
307
|
if (!this.alwaysVisible) {
|
|
330
308
|
this.element.style.opacity = 0;
|
|
331
309
|
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
return ScrollBar;
|
|
335
|
-
}(Class));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
336
312
|
|
|
337
313
|
// export class Scroller extends Class {
|
|
338
|
-
export
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
314
|
+
export class Scroller extends Observable {
|
|
315
|
+
constructor(element, options) {
|
|
316
|
+
super();
|
|
317
|
+
let that = this;
|
|
342
318
|
this.element = element;
|
|
343
319
|
|
|
344
320
|
this._initOptions(options);
|
|
345
321
|
|
|
346
|
-
|
|
322
|
+
const hasScrolling = hasNativeScrolling(navigator.userAgent);
|
|
347
323
|
that._native = that.options.useNative && hasScrolling;
|
|
348
|
-
|
|
324
|
+
const scrollHeader = convertToHtml('<div class="km-scroll-header"/>');
|
|
349
325
|
|
|
350
326
|
if (that._native) {
|
|
351
327
|
addClass(element, 'km-native-scroller');
|
|
@@ -362,11 +338,11 @@ export var Scroller = (function (Observable) {
|
|
|
362
338
|
element.style.overflow = "hidden";
|
|
363
339
|
addClass(element, 'km-scroll-wrapper');
|
|
364
340
|
|
|
365
|
-
|
|
341
|
+
const scrollContainer = convertToHtml('<div class="km-scroll-container"/>');
|
|
366
342
|
wrapInner(element, scrollContainer);
|
|
367
343
|
prepend(scrollHeader, element);
|
|
368
344
|
|
|
369
|
-
|
|
345
|
+
let inner = element.children[1],
|
|
370
346
|
tapCapture = new TapCapture(element),
|
|
371
347
|
movable = new Movable(inner),
|
|
372
348
|
|
|
@@ -384,9 +360,9 @@ export var Scroller = (function (Observable) {
|
|
|
384
360
|
captureUpIfMoved: true,
|
|
385
361
|
multiTouch: that.options.zoom,
|
|
386
362
|
supportDoubleTap: that.options.supportDoubleTap,
|
|
387
|
-
start
|
|
363
|
+
start(e) {
|
|
388
364
|
dimensions.refresh();
|
|
389
|
-
|
|
365
|
+
let velocityX = abs(e.x.velocity),
|
|
390
366
|
velocityY = abs(e.y.velocity),
|
|
391
367
|
horizontalSwipe = velocityX * 2 >= velocityY,
|
|
392
368
|
originatedFromFixedContainer = that.fixedContainer.contains(e.event.target),
|
|
@@ -414,7 +390,7 @@ export var Scroller = (function (Observable) {
|
|
|
414
390
|
}),
|
|
415
391
|
|
|
416
392
|
animatedScroller = new AnimatedScroller({
|
|
417
|
-
moveTo
|
|
393
|
+
moveTo(coordinates) {
|
|
418
394
|
that.scrollTo(coordinates.x, coordinates.y);
|
|
419
395
|
}
|
|
420
396
|
});
|
|
@@ -464,15 +440,11 @@ export var Scroller = (function (Observable) {
|
|
|
464
440
|
}
|
|
465
441
|
}
|
|
466
442
|
|
|
467
|
-
|
|
468
|
-
Scroller.prototype = Object.create( Observable && Observable.prototype );
|
|
469
|
-
Scroller.prototype.constructor = Scroller;
|
|
470
|
-
|
|
471
|
-
Scroller.prototype._initOptions = function _initOptions (options) {
|
|
443
|
+
_initOptions(options) {
|
|
472
444
|
this.options = deepExtend({}, this.options, options);
|
|
473
|
-
}
|
|
445
|
+
}
|
|
474
446
|
|
|
475
|
-
|
|
447
|
+
_wheelScroll(e) {
|
|
476
448
|
if (e.ctrlKey) {
|
|
477
449
|
return;
|
|
478
450
|
}
|
|
@@ -484,7 +456,7 @@ export var Scroller = (function (Observable) {
|
|
|
484
456
|
|
|
485
457
|
clearTimeout(this._wheelTimeout);
|
|
486
458
|
this._wheelTimeout = setTimeout(this._wheelEnd, 50);
|
|
487
|
-
|
|
459
|
+
let delta = wheelDeltaY(e);
|
|
488
460
|
|
|
489
461
|
if (delta) {
|
|
490
462
|
this._wheelY += delta;
|
|
@@ -492,45 +464,45 @@ export var Scroller = (function (Observable) {
|
|
|
492
464
|
}
|
|
493
465
|
|
|
494
466
|
e.preventDefault();
|
|
495
|
-
}
|
|
467
|
+
}
|
|
496
468
|
|
|
497
|
-
|
|
469
|
+
makeVirtual() {
|
|
498
470
|
this.dimensions.y.makeVirtual();
|
|
499
|
-
}
|
|
471
|
+
}
|
|
500
472
|
|
|
501
|
-
|
|
473
|
+
virtualSize(min, max) {
|
|
502
474
|
this.dimensions.y.virtualSize(min, max);
|
|
503
|
-
}
|
|
475
|
+
}
|
|
504
476
|
|
|
505
|
-
|
|
477
|
+
height() {
|
|
506
478
|
return this.dimensions.y.size;
|
|
507
|
-
}
|
|
479
|
+
}
|
|
508
480
|
|
|
509
|
-
|
|
481
|
+
scrollHeight() {
|
|
510
482
|
return this.scrollElement.scrollHeight;
|
|
511
|
-
}
|
|
483
|
+
}
|
|
512
484
|
|
|
513
|
-
|
|
485
|
+
scrollWidth() {
|
|
514
486
|
return this.scrollElement.scrollWidth;
|
|
515
|
-
}
|
|
487
|
+
}
|
|
516
488
|
|
|
517
|
-
|
|
489
|
+
_resize() {
|
|
518
490
|
if (!this._native) {
|
|
519
491
|
this.contentResized();
|
|
520
492
|
}
|
|
521
|
-
}
|
|
493
|
+
}
|
|
522
494
|
|
|
523
|
-
|
|
524
|
-
|
|
495
|
+
setOptions(options) {
|
|
496
|
+
let that = this;
|
|
525
497
|
|
|
526
498
|
this._initOptions(options);
|
|
527
499
|
|
|
528
500
|
if (options.pullToRefresh) {
|
|
529
501
|
that._initPullToRefresh();
|
|
530
502
|
}
|
|
531
|
-
}
|
|
503
|
+
}
|
|
532
504
|
|
|
533
|
-
|
|
505
|
+
reset() {
|
|
534
506
|
if (this._native) {
|
|
535
507
|
this.scrollElement.scrollTop(0);
|
|
536
508
|
} else {
|
|
@@ -540,9 +512,9 @@ export var Scroller = (function (Observable) {
|
|
|
540
512
|
});
|
|
541
513
|
this._scale(1);
|
|
542
514
|
}
|
|
543
|
-
}
|
|
515
|
+
}
|
|
544
516
|
|
|
545
|
-
|
|
517
|
+
contentResized() {
|
|
546
518
|
this.dimensions.refresh();
|
|
547
519
|
if (this.pane.x.outOfBounds()) {
|
|
548
520
|
this.movable.moveAxis('x', this.dimensions.x.min);
|
|
@@ -550,24 +522,24 @@ export var Scroller = (function (Observable) {
|
|
|
550
522
|
if (this.pane.y.outOfBounds()) {
|
|
551
523
|
this.movable.moveAxis('y', this.dimensions.y.min);
|
|
552
524
|
}
|
|
553
|
-
}
|
|
525
|
+
}
|
|
554
526
|
|
|
555
|
-
|
|
556
|
-
|
|
527
|
+
zoomOut() {
|
|
528
|
+
let dimensions = this.dimensions;
|
|
557
529
|
dimensions.refresh();
|
|
558
530
|
this._scale(dimensions.fitScale);
|
|
559
531
|
this.movable.moveTo(dimensions.centerCoordinates());
|
|
560
|
-
}
|
|
532
|
+
}
|
|
561
533
|
|
|
562
|
-
|
|
534
|
+
enable() {
|
|
563
535
|
this.enabled = true;
|
|
564
|
-
}
|
|
536
|
+
}
|
|
565
537
|
|
|
566
|
-
|
|
538
|
+
disable() {
|
|
567
539
|
this.enabled = false;
|
|
568
|
-
}
|
|
540
|
+
}
|
|
569
541
|
|
|
570
|
-
|
|
542
|
+
scrollTo(x, y) {
|
|
571
543
|
if (this._native) {
|
|
572
544
|
this.scrollElement.scrollLeft(abs(x));
|
|
573
545
|
this.scrollElement.scrollTop(abs(y));
|
|
@@ -578,10 +550,10 @@ export var Scroller = (function (Observable) {
|
|
|
578
550
|
y: y
|
|
579
551
|
});
|
|
580
552
|
}
|
|
581
|
-
}
|
|
553
|
+
}
|
|
582
554
|
|
|
583
|
-
|
|
584
|
-
|
|
555
|
+
animatedScrollTo(x, y, callback) {
|
|
556
|
+
let from, to;
|
|
585
557
|
if (this._native) {
|
|
586
558
|
this.scrollTo(x, y);
|
|
587
559
|
} else {
|
|
@@ -597,10 +569,10 @@ export var Scroller = (function (Observable) {
|
|
|
597
569
|
this.animatedScroller.setCallback(callback);
|
|
598
570
|
this.animatedScroller.start();
|
|
599
571
|
}
|
|
600
|
-
}
|
|
572
|
+
}
|
|
601
573
|
|
|
602
574
|
// kept for API compatibility, not used
|
|
603
|
-
|
|
575
|
+
pullHandled() {
|
|
604
576
|
// let that = this;
|
|
605
577
|
|
|
606
578
|
// removeClass(that.refreshHint, SCROLLER_REFRESH_CLASS);
|
|
@@ -609,28 +581,28 @@ export var Scroller = (function (Observable) {
|
|
|
609
581
|
// that.yinertia.onEnd();
|
|
610
582
|
// that.xinertia.onEnd();
|
|
611
583
|
// that.userEvents.cancel();
|
|
612
|
-
}
|
|
584
|
+
}
|
|
613
585
|
|
|
614
|
-
|
|
615
|
-
|
|
586
|
+
destroy() {
|
|
587
|
+
const element = this.element;
|
|
616
588
|
|
|
617
589
|
off(element, 'wheel', this._wheelScrollHandler);
|
|
618
590
|
|
|
619
591
|
if (this.userEvents) {
|
|
620
592
|
this.userEvents.destroy();
|
|
621
593
|
}
|
|
622
|
-
}
|
|
594
|
+
}
|
|
623
595
|
|
|
624
|
-
|
|
596
|
+
_scale(scale) {
|
|
625
597
|
this.dimensions.rescale(scale);
|
|
626
598
|
this.movable.scaleTo(scale);
|
|
627
|
-
}
|
|
599
|
+
}
|
|
628
600
|
|
|
629
|
-
|
|
630
|
-
}
|
|
601
|
+
_initPullToRefresh() {
|
|
602
|
+
}
|
|
631
603
|
|
|
632
604
|
// kept for API compatibility, not used
|
|
633
|
-
|
|
605
|
+
_dragEnd() {
|
|
634
606
|
// let that = this;
|
|
635
607
|
|
|
636
608
|
// if (!that.pulled) {
|
|
@@ -646,10 +618,10 @@ export var Scroller = (function (Observable) {
|
|
|
646
618
|
|
|
647
619
|
// that.yinertia.freeze(that.options.pullOffset / 2);
|
|
648
620
|
// that.trigger('pull');
|
|
649
|
-
}
|
|
621
|
+
}
|
|
650
622
|
|
|
651
623
|
// kept for API compatibility, not used
|
|
652
|
-
|
|
624
|
+
_paneChange() {
|
|
653
625
|
// let that = this;
|
|
654
626
|
// if (that.movable.y / OUT_OF_BOUNDS_FRICTION > that.options.pullOffset) {
|
|
655
627
|
// if (!that.pulled) {
|
|
@@ -663,10 +635,10 @@ export var Scroller = (function (Observable) {
|
|
|
663
635
|
// that.refreshHint.removeClass(SCROLLER_RELEASE_CLASS);
|
|
664
636
|
// that.hintContainer.html(that.pullTemplate({}));
|
|
665
637
|
// }
|
|
666
|
-
}
|
|
638
|
+
}
|
|
667
639
|
|
|
668
|
-
|
|
669
|
-
|
|
640
|
+
_initAxis(axis) {
|
|
641
|
+
let that = this,
|
|
670
642
|
movable = that.movable,
|
|
671
643
|
dimension = that.dimensions[axis],
|
|
672
644
|
tapCapture = that.tapCapture,
|
|
@@ -697,7 +669,7 @@ export var Scroller = (function (Observable) {
|
|
|
697
669
|
elastic: that.options.elastic,
|
|
698
670
|
friction: that.options.friction || FRICTION,
|
|
699
671
|
velocityMultiplier: that.options.velocityMultiplier || VELOCITY_MULTIPLIER,
|
|
700
|
-
end
|
|
672
|
+
end() {
|
|
701
673
|
scrollBar.hide();
|
|
702
674
|
that.trigger('scrollEnd', {
|
|
703
675
|
axis: axis,
|
|
@@ -706,10 +678,8 @@ export var Scroller = (function (Observable) {
|
|
|
706
678
|
});
|
|
707
679
|
}
|
|
708
680
|
});
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
return Scroller;
|
|
712
|
-
}(Observable));
|
|
681
|
+
}
|
|
682
|
+
}
|
|
713
683
|
|
|
714
684
|
setDefaultOptions(Scroller, {
|
|
715
685
|
name: 'Scroller',
|
|
@@ -719,7 +689,7 @@ setDefaultOptions(Scroller, {
|
|
|
719
689
|
elastic: true,
|
|
720
690
|
useNative: false,
|
|
721
691
|
mousewheelScrolling: true,
|
|
722
|
-
avoidScrolling
|
|
692
|
+
avoidScrolling() {
|
|
723
693
|
return false;
|
|
724
694
|
},
|
|
725
695
|
pullToRefresh: false,
|