@visactor/vrender 1.0.38 → 1.0.40-alpha.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/cjs/index.d.ts +1 -1
- package/cjs/index.js +11 -10
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +47 -22
- package/dist/index.js +47 -22
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +7 -7
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,16 +21,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits"), vrender_animate_1 = require("@visactor/vrender-animate");
|
|
23
23
|
|
|
24
|
-
exports.version = "1.0.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(0, vrender_kits_2.
|
|
28
|
-
(0, vrender_kits_2.
|
|
29
|
-
(0, vrender_kits_2.
|
|
30
|
-
(0, vrender_kits_2.
|
|
31
|
-
vrender_kits_2.
|
|
32
|
-
(0, vrender_kits_2.
|
|
33
|
-
(0,
|
|
24
|
+
exports.version = "1.0.40-alpha.0", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
|
+
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
|
+
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
|
+
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
28
|
+
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
|
29
|
+
(0, vrender_kits_2.registerImage)(), (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(),
|
|
30
|
+
(0, vrender_kits_2.registerPolygon)(), (0, vrender_kits_2.registerPyramid3d)(),
|
|
31
|
+
(0, vrender_kits_2.registerRect)(), (0, vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(),
|
|
32
|
+
(0, vrender_kits_2.registerShadowRoot)(), (0, vrender_kits_2.registerSymbol)(),
|
|
33
|
+
(0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(), (0,
|
|
34
|
+
vrender_kits_1.registerStar)(), (0, vrender_core_1.registerFlexLayoutPlugin)(),
|
|
34
35
|
(0, vrender_core_1.registerViewTransform3dPlugin)(), (0, vrender_core_1.registerHtmlAttributePlugin)(),
|
|
35
36
|
(0, vrender_core_1.registerReactAttributePlugin)(), (0, vrender_core_1.registerDirectionalLight)(),
|
|
36
37
|
(0, vrender_core_1.registerOrthoCamera)(), (0, vrender_animate_1.registerCustomAnimate)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAChC,+DAAmF;AAEtE,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAChC,+DAAmF;AAEtE,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAY,GAAE,CAAC;AAEf,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AAEtB,IAAA,uCAAqB,GAAE,CAAC;AACxB,IAAA,iCAAe,GAAE,CAAC;AAElB,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C;AAC1C,+DAA6C;AAG7C,6DAAkD;AAAzC,wGAAA,KAAK,OAAA;AACd,uDAAmD;AAA1C,yGAAA,SAAS,OAAA","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv, registerStar } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\nimport { registerCustomAnimate, registerAnimate } from '@visactor/vrender-animate';\n// 导出版本号\nexport const version = \"1.0.40-alpha.0\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nregisterStar();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\n\nregisterCustomAnimate();\nregisterAnimate();\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-animate';\nexport * from '@visactor/vrender-components';\n\n// avoid naming conflicts with 'State' & 'Direction' in '@visactor/vrender-components'\nexport { State } from '@visactor/vrender-animate';\nexport { Direction } from '@visactor/vrender-core';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -32101,7 +32101,7 @@ class AnimateExecutor {
|
|
|
32101
32101
|
let parsedFromProps = null,
|
|
32102
32102
|
props = params.to,
|
|
32103
32103
|
from = params.from;
|
|
32104
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
32104
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
32105
32105
|
let totalDelay = 0;
|
|
32106
32106
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
32107
32107
|
const delayAfterValue = isFunction$1(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -32164,7 +32164,7 @@ class AnimateExecutor {
|
|
|
32164
32164
|
let parsedFromProps = null,
|
|
32165
32165
|
props = effect.to,
|
|
32166
32166
|
from = effect.from;
|
|
32167
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from);
|
|
32167
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
|
|
32168
32168
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
|
|
32169
32169
|
customType = effect.custom ? effect.customType : getCustomType(custom);
|
|
32170
32170
|
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
@@ -32183,22 +32183,31 @@ class AnimateExecutor {
|
|
|
32183
32183
|
animate.play(customAnimate);
|
|
32184
32184
|
}
|
|
32185
32185
|
createPropsFromChannel(channel, graphic) {
|
|
32186
|
+
var _a;
|
|
32186
32187
|
const props = {};
|
|
32187
32188
|
let from = null;
|
|
32188
|
-
|
|
32189
|
-
|
|
32190
|
-
|
|
32191
|
-
|
|
32192
|
-
}
|
|
32189
|
+
if (!channel) return {
|
|
32190
|
+
from: from,
|
|
32191
|
+
props: props,
|
|
32192
|
+
attrOutChannel: null
|
|
32193
|
+
};
|
|
32194
|
+
const attrOutChannel = {};
|
|
32195
|
+
let hasAttrs = !1;
|
|
32196
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
32197
|
+
if (Array.isArray(channel) && (channel = channel.reduce((res, key) => (void 0 === diffAttrs[key] || (res[key] = {
|
|
32198
|
+
to: diffAttrs[key]
|
|
32199
|
+
}), res), {})), Object.keys(channel).forEach(key => {
|
|
32193
32200
|
var _a, _b, _c, _d;
|
|
32194
32201
|
const config = channel[key];
|
|
32195
32202
|
void 0 !== config.to && ("function" == typeof config.to ? props[key] = config.to(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : props[key] = config.to), void 0 !== config.from && (from || (from = {}), "function" == typeof config.from ? from[key] = config.from(null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, {}) : from[key] = config.from);
|
|
32196
|
-
}), {
|
|
32197
|
-
|
|
32198
|
-
props
|
|
32199
|
-
}
|
|
32203
|
+
}), diffAttrs) for (const key in diffAttrs) {
|
|
32204
|
+
const value = diffAttrs[key];
|
|
32205
|
+
void 0 !== value && (props.hasOwnProperty(key) || (attrOutChannel[key] = value, hasAttrs = !0));
|
|
32206
|
+
}
|
|
32207
|
+
return {
|
|
32200
32208
|
from: from,
|
|
32201
|
-
props: props
|
|
32209
|
+
props: props,
|
|
32210
|
+
attrOutChannel: hasAttrs ? attrOutChannel : null
|
|
32202
32211
|
};
|
|
32203
32212
|
}
|
|
32204
32213
|
resolveValue(value, graphic, defaultValue) {
|
|
@@ -37479,14 +37488,20 @@ class ScrollBar extends AbstractComponent {
|
|
|
37479
37488
|
x: x,
|
|
37480
37489
|
y: y
|
|
37481
37490
|
} = this.stage.eventPointTransform(e);
|
|
37482
|
-
let
|
|
37483
|
-
|
|
37491
|
+
let currentPos,
|
|
37492
|
+
currentScrollValue = 0,
|
|
37484
37493
|
delta = 0;
|
|
37485
37494
|
const {
|
|
37486
|
-
|
|
37487
|
-
|
|
37488
|
-
|
|
37489
|
-
|
|
37495
|
+
width: width,
|
|
37496
|
+
height: height
|
|
37497
|
+
} = this.getSliderRenderBounds(),
|
|
37498
|
+
track = "vertical" === direction ? height : width,
|
|
37499
|
+
travel = Math.max(track - this._sliderSize, 0),
|
|
37500
|
+
{
|
|
37501
|
+
range: range
|
|
37502
|
+
} = this.attribute,
|
|
37503
|
+
ratio = clamp$1(range[1] - range[0], 0, 1);
|
|
37504
|
+
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos) : (currentPos = x, delta = currentPos - this._prePos), currentScrollValue = travel > 0 && ratio < 1 ? delta / travel * (1 - ratio) : 0, [currentPos, currentScrollValue];
|
|
37490
37505
|
}, this._onSliderPointerMove = e => {
|
|
37491
37506
|
const {
|
|
37492
37507
|
stopSliderMovePropagation = !0
|
|
@@ -37631,15 +37646,24 @@ class ScrollBar extends AbstractComponent {
|
|
|
37631
37646
|
}
|
|
37632
37647
|
_getSliderPos(range) {
|
|
37633
37648
|
const {
|
|
37634
|
-
direction: direction
|
|
37649
|
+
direction: direction,
|
|
37650
|
+
minSliderSize = 0
|
|
37635
37651
|
} = this.attribute,
|
|
37636
37652
|
{
|
|
37637
37653
|
width: width,
|
|
37638
37654
|
height: height,
|
|
37639
37655
|
x1: x1,
|
|
37640
37656
|
y1: y1
|
|
37641
|
-
} = this.getSliderRenderBounds()
|
|
37642
|
-
|
|
37657
|
+
} = this.getSliderRenderBounds(),
|
|
37658
|
+
track = "horizontal" === direction ? width : height,
|
|
37659
|
+
origin = "horizontal" === direction ? x1 : y1,
|
|
37660
|
+
start = clamp$1(range[0], 0, 1),
|
|
37661
|
+
end = clamp$1(range[1], 0, 1),
|
|
37662
|
+
ratio = clamp$1(end - start, 0, 1),
|
|
37663
|
+
L = Math.max(ratio * track, minSliderSize),
|
|
37664
|
+
T = Math.max(track - L, 0),
|
|
37665
|
+
pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
|
|
37666
|
+
return [pStart, pStart + L];
|
|
37643
37667
|
}
|
|
37644
37668
|
_getScrollRange() {
|
|
37645
37669
|
if (this._sliderLimitRange) return this._sliderLimitRange;
|
|
@@ -37679,6 +37703,7 @@ ScrollBar.defaultAttributes = {
|
|
|
37679
37703
|
direction: "horizontal",
|
|
37680
37704
|
round: !0,
|
|
37681
37705
|
sliderSize: 20,
|
|
37706
|
+
minSliderSize: 0,
|
|
37682
37707
|
sliderStyle: {
|
|
37683
37708
|
fill: "rgba(0, 0, 0, .5)"
|
|
37684
37709
|
},
|
|
@@ -53028,7 +53053,7 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
53028
53053
|
select: !0
|
|
53029
53054
|
};
|
|
53030
53055
|
|
|
53031
|
-
const version = "1.0.
|
|
53056
|
+
const version = "1.0.40-alpha.0";
|
|
53032
53057
|
preLoadAllModule();
|
|
53033
53058
|
if (isBrowserEnv()) {
|
|
53034
53059
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -32107,7 +32107,7 @@
|
|
|
32107
32107
|
let parsedFromProps = null,
|
|
32108
32108
|
props = params.to,
|
|
32109
32109
|
from = params.from;
|
|
32110
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
32110
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
32111
32111
|
let totalDelay = 0;
|
|
32112
32112
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
32113
32113
|
const delayAfterValue = isFunction$1(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -32170,7 +32170,7 @@
|
|
|
32170
32170
|
let parsedFromProps = null,
|
|
32171
32171
|
props = effect.to,
|
|
32172
32172
|
from = effect.from;
|
|
32173
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from);
|
|
32173
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
|
|
32174
32174
|
const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
|
|
32175
32175
|
customType = effect.custom ? effect.customType : getCustomType(custom);
|
|
32176
32176
|
this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
@@ -32189,22 +32189,31 @@
|
|
|
32189
32189
|
animate.play(customAnimate);
|
|
32190
32190
|
}
|
|
32191
32191
|
createPropsFromChannel(channel, graphic) {
|
|
32192
|
+
var _a;
|
|
32192
32193
|
const props = {};
|
|
32193
32194
|
let from = null;
|
|
32194
|
-
|
|
32195
|
-
|
|
32196
|
-
|
|
32197
|
-
|
|
32198
|
-
}
|
|
32195
|
+
if (!channel) return {
|
|
32196
|
+
from: from,
|
|
32197
|
+
props: props,
|
|
32198
|
+
attrOutChannel: null
|
|
32199
|
+
};
|
|
32200
|
+
const attrOutChannel = {};
|
|
32201
|
+
let hasAttrs = !1;
|
|
32202
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
32203
|
+
if (Array.isArray(channel) && (channel = channel.reduce((res, key) => (void 0 === diffAttrs[key] || (res[key] = {
|
|
32204
|
+
to: diffAttrs[key]
|
|
32205
|
+
}), res), {})), Object.keys(channel).forEach(key => {
|
|
32199
32206
|
var _a, _b, _c, _d;
|
|
32200
32207
|
const config = channel[key];
|
|
32201
32208
|
void 0 !== config.to && ("function" == typeof config.to ? props[key] = config.to(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : props[key] = config.to), void 0 !== config.from && (from || (from = {}), "function" == typeof config.from ? from[key] = config.from(null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, {}) : from[key] = config.from);
|
|
32202
|
-
}), {
|
|
32203
|
-
|
|
32204
|
-
props
|
|
32205
|
-
}
|
|
32209
|
+
}), diffAttrs) for (const key in diffAttrs) {
|
|
32210
|
+
const value = diffAttrs[key];
|
|
32211
|
+
void 0 !== value && (props.hasOwnProperty(key) || (attrOutChannel[key] = value, hasAttrs = !0));
|
|
32212
|
+
}
|
|
32213
|
+
return {
|
|
32206
32214
|
from: from,
|
|
32207
|
-
props: props
|
|
32215
|
+
props: props,
|
|
32216
|
+
attrOutChannel: hasAttrs ? attrOutChannel : null
|
|
32208
32217
|
};
|
|
32209
32218
|
}
|
|
32210
32219
|
resolveValue(value, graphic, defaultValue) {
|
|
@@ -37485,14 +37494,20 @@
|
|
|
37485
37494
|
x: x,
|
|
37486
37495
|
y: y
|
|
37487
37496
|
} = this.stage.eventPointTransform(e);
|
|
37488
|
-
let
|
|
37489
|
-
|
|
37497
|
+
let currentPos,
|
|
37498
|
+
currentScrollValue = 0,
|
|
37490
37499
|
delta = 0;
|
|
37491
37500
|
const {
|
|
37492
|
-
|
|
37493
|
-
|
|
37494
|
-
|
|
37495
|
-
|
|
37501
|
+
width: width,
|
|
37502
|
+
height: height
|
|
37503
|
+
} = this.getSliderRenderBounds(),
|
|
37504
|
+
track = "vertical" === direction ? height : width,
|
|
37505
|
+
travel = Math.max(track - this._sliderSize, 0),
|
|
37506
|
+
{
|
|
37507
|
+
range: range
|
|
37508
|
+
} = this.attribute,
|
|
37509
|
+
ratio = clamp$1(range[1] - range[0], 0, 1);
|
|
37510
|
+
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos) : (currentPos = x, delta = currentPos - this._prePos), currentScrollValue = travel > 0 && ratio < 1 ? delta / travel * (1 - ratio) : 0, [currentPos, currentScrollValue];
|
|
37496
37511
|
}, this._onSliderPointerMove = e => {
|
|
37497
37512
|
const {
|
|
37498
37513
|
stopSliderMovePropagation = !0
|
|
@@ -37637,15 +37652,24 @@
|
|
|
37637
37652
|
}
|
|
37638
37653
|
_getSliderPos(range) {
|
|
37639
37654
|
const {
|
|
37640
|
-
direction: direction
|
|
37655
|
+
direction: direction,
|
|
37656
|
+
minSliderSize = 0
|
|
37641
37657
|
} = this.attribute,
|
|
37642
37658
|
{
|
|
37643
37659
|
width: width,
|
|
37644
37660
|
height: height,
|
|
37645
37661
|
x1: x1,
|
|
37646
37662
|
y1: y1
|
|
37647
|
-
} = this.getSliderRenderBounds()
|
|
37648
|
-
|
|
37663
|
+
} = this.getSliderRenderBounds(),
|
|
37664
|
+
track = "horizontal" === direction ? width : height,
|
|
37665
|
+
origin = "horizontal" === direction ? x1 : y1,
|
|
37666
|
+
start = clamp$1(range[0], 0, 1),
|
|
37667
|
+
end = clamp$1(range[1], 0, 1),
|
|
37668
|
+
ratio = clamp$1(end - start, 0, 1),
|
|
37669
|
+
L = Math.max(ratio * track, minSliderSize),
|
|
37670
|
+
T = Math.max(track - L, 0),
|
|
37671
|
+
pStart = origin + start / Math.max(1 - ratio, 1e-12) * T;
|
|
37672
|
+
return [pStart, pStart + L];
|
|
37649
37673
|
}
|
|
37650
37674
|
_getScrollRange() {
|
|
37651
37675
|
if (this._sliderLimitRange) return this._sliderLimitRange;
|
|
@@ -37685,6 +37709,7 @@
|
|
|
37685
37709
|
direction: "horizontal",
|
|
37686
37710
|
round: !0,
|
|
37687
37711
|
sliderSize: 20,
|
|
37712
|
+
minSliderSize: 0,
|
|
37688
37713
|
sliderStyle: {
|
|
37689
37714
|
fill: "rgba(0, 0, 0, .5)"
|
|
37690
37715
|
},
|
|
@@ -53034,7 +53059,7 @@
|
|
|
53034
53059
|
select: !0
|
|
53035
53060
|
};
|
|
53036
53061
|
|
|
53037
|
-
const version = "1.0.
|
|
53062
|
+
const version = "1.0.40-alpha.0";
|
|
53038
53063
|
preLoadAllModule();
|
|
53039
53064
|
if (isBrowserEnv()) {
|
|
53040
53065
|
loadBrowserEnv(container);
|