@visactor/vrender 1.0.41-alpha.2 → 1.0.41-alpha.3
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 +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +108 -43
- package/dist/index.js +108 -43
- 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,7 +21,7 @@ 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.41-alpha.
|
|
24
|
+
exports.version = "1.0.41-alpha.3", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
25
|
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
26
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
27
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
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,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.41-alpha.
|
|
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.41-alpha.3\";\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
|
@@ -631,28 +631,59 @@ class EventListenerManager {
|
|
|
631
631
|
}
|
|
632
632
|
addEventListener(type, listener, options) {
|
|
633
633
|
if (!listener) return;
|
|
634
|
+
const capture = this._resolveCapture(options),
|
|
635
|
+
once = this._resolveOnce(options),
|
|
636
|
+
listenerTypeMap = this._getOrCreateListenerTypeMap(type),
|
|
637
|
+
wrappedMap = this._getOrCreateWrappedMap(listenerTypeMap, listener);
|
|
638
|
+
if (wrappedMap.has(capture)) return;
|
|
634
639
|
const wrappedListener = event => {
|
|
635
640
|
const transformedEvent = this._eventListenerTransformer(event);
|
|
636
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
641
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent), once && this._deleteListenerRecord(type, listener, capture);
|
|
637
642
|
};
|
|
638
|
-
|
|
643
|
+
wrappedMap.set(capture, {
|
|
644
|
+
wrappedListener: wrappedListener,
|
|
645
|
+
options: options
|
|
646
|
+
}), this._nativeAddEventListener(type, wrappedListener, options);
|
|
639
647
|
}
|
|
640
648
|
removeEventListener(type, listener, options) {
|
|
641
|
-
var _a;
|
|
649
|
+
var _a, _b;
|
|
642
650
|
if (!listener) return;
|
|
643
|
-
const
|
|
644
|
-
|
|
651
|
+
const capture = this._resolveCapture(options),
|
|
652
|
+
wrappedRecord = null === (_b = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener)) || void 0 === _b ? void 0 : _b.get(capture);
|
|
653
|
+
wrappedRecord && (this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture), this._deleteListenerRecord(type, listener, capture));
|
|
645
654
|
}
|
|
646
655
|
dispatchEvent(event) {
|
|
647
656
|
return this._nativeDispatchEvent(event);
|
|
648
657
|
}
|
|
649
658
|
clearAllEventListeners() {
|
|
650
|
-
this._listenerMap.forEach((
|
|
651
|
-
|
|
652
|
-
|
|
659
|
+
this._listenerMap.forEach((listenerMap, type) => {
|
|
660
|
+
listenerMap.forEach(wrappedMap => {
|
|
661
|
+
wrappedMap.forEach((wrappedRecord, capture) => {
|
|
662
|
+
this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture);
|
|
663
|
+
});
|
|
653
664
|
});
|
|
654
665
|
}), this._listenerMap.clear();
|
|
655
666
|
}
|
|
667
|
+
_resolveCapture(options) {
|
|
668
|
+
return "boolean" == typeof options ? options : !!(null == options ? void 0 : options.capture);
|
|
669
|
+
}
|
|
670
|
+
_resolveOnce(options) {
|
|
671
|
+
return "object" == typeof options && !!(null == options ? void 0 : options.once);
|
|
672
|
+
}
|
|
673
|
+
_getOrCreateListenerTypeMap(type) {
|
|
674
|
+
let listenerTypeMap = this._listenerMap.get(type);
|
|
675
|
+
return listenerTypeMap || (listenerTypeMap = new Map(), this._listenerMap.set(type, listenerTypeMap)), listenerTypeMap;
|
|
676
|
+
}
|
|
677
|
+
_getOrCreateWrappedMap(listenerTypeMap, listener) {
|
|
678
|
+
let wrappedMap = listenerTypeMap.get(listener);
|
|
679
|
+
return wrappedMap || (wrappedMap = new Map(), listenerTypeMap.set(listener, wrappedMap)), wrappedMap;
|
|
680
|
+
}
|
|
681
|
+
_deleteListenerRecord(type, listener, capture) {
|
|
682
|
+
const listenerTypeMap = this._listenerMap.get(type);
|
|
683
|
+
if (!listenerTypeMap) return;
|
|
684
|
+
const wrappedMap = listenerTypeMap.get(listener);
|
|
685
|
+
wrappedMap && (wrappedMap.delete(capture), 0 === wrappedMap.size && listenerTypeMap.delete(listener), 0 === listenerTypeMap.size && this._listenerMap.delete(type));
|
|
686
|
+
}
|
|
656
687
|
_nativeAddEventListener(type, listener, options) {
|
|
657
688
|
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
658
689
|
}
|
|
@@ -7460,7 +7491,9 @@ class EventManager {
|
|
|
7460
7491
|
var _a;
|
|
7461
7492
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
7462
7493
|
const constructor = event.constructor;
|
|
7463
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
7494
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
7495
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
7496
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
7464
7497
|
}
|
|
7465
7498
|
notifyListeners(e, type) {
|
|
7466
7499
|
const listeners = e.currentTarget._events[type];
|
|
@@ -10264,7 +10297,7 @@ class Graphic extends Node {
|
|
|
10264
10297
|
});
|
|
10265
10298
|
}
|
|
10266
10299
|
release() {
|
|
10267
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
10300
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
10268
10301
|
}
|
|
10269
10302
|
_emitCustomEvent(type, context) {
|
|
10270
10303
|
var _a, _b;
|
|
@@ -15994,9 +16027,10 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
15994
16027
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
15995
16028
|
} else {
|
|
15996
16029
|
const {
|
|
15997
|
-
backgroundCornerRadius: backgroundCornerRadius
|
|
16030
|
+
backgroundCornerRadius: backgroundCornerRadius,
|
|
16031
|
+
backgroundOpacity = 1
|
|
15998
16032
|
} = graphic.attribute;
|
|
15999
|
-
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
16033
|
+
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity, context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
16000
16034
|
}
|
|
16001
16035
|
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
16002
16036
|
}
|
|
@@ -18262,12 +18296,12 @@ class Stage extends Group {
|
|
|
18262
18296
|
throw new Error("暂不支持");
|
|
18263
18297
|
}
|
|
18264
18298
|
release() {
|
|
18265
|
-
var _a, _b;
|
|
18299
|
+
var _a, _b, _d;
|
|
18266
18300
|
super.release(), this.hooks.beforeRender.unTap("constructor", this.beforeRender), this.hooks.afterRender.unTap("constructor", this.afterRender), this.eventSystem && this.eventSystem.release(), this.layerService.releaseStage(this), this.pluginService.release(), this.forEach(layer => {
|
|
18267
18301
|
layer.release();
|
|
18268
18302
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
18269
18303
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
18270
|
-
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.renderService.renderTreeRoots = [];
|
|
18304
|
+
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.params.ticker || null === (_d = this._ticker) || void 0 === _d || _d.release(), this.renderService.renderTreeRoots = [];
|
|
18271
18305
|
}
|
|
18272
18306
|
setStage(stage) {}
|
|
18273
18307
|
dirty(b, matrix) {
|
|
@@ -43523,8 +43557,9 @@ class LabelBase extends AnimateComponent {
|
|
|
43523
43557
|
const label = labels[i];
|
|
43524
43558
|
if (!label) continue;
|
|
43525
43559
|
const baseMark = this.getRelatedGraphic(label.attribute);
|
|
43526
|
-
let backgroundColor = baseMark.getAttributes(!0).fill
|
|
43527
|
-
|
|
43560
|
+
let backgroundColor = baseMark.getAttributes(!0).fill;
|
|
43561
|
+
const backgroundOpacity = baseMark.getAttributes(!0).fillOpacity;
|
|
43562
|
+
let foregroundColor = label.attribute.fill;
|
|
43528
43563
|
if (isObject$1(backgroundColor) && backgroundColor.gradient) {
|
|
43529
43564
|
const firstStopColor = null === (_g = null === (_f = backgroundColor.stops) || void 0 === _f ? void 0 : _f[0]) || void 0 === _g ? void 0 : _g.color;
|
|
43530
43565
|
firstStopColor && (backgroundColor = firstStopColor, foregroundColor = firstStopColor);
|
|
@@ -43538,11 +43573,26 @@ class LabelBase extends AnimateComponent {
|
|
|
43538
43573
|
if (fill && label.setAttributes({
|
|
43539
43574
|
fill: fill
|
|
43540
43575
|
}), 0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43541
|
-
|
|
43542
|
-
|
|
43543
|
-
|
|
43544
|
-
|
|
43576
|
+
if ("background" === interactInvertType) label.setAttributes({
|
|
43577
|
+
stroke: !1
|
|
43578
|
+
});else {
|
|
43579
|
+
const stroke = smartInvertStrategy(strokeStrategy, backgroundColor, invertColor, similarColor);
|
|
43580
|
+
stroke && label.setAttributes({
|
|
43581
|
+
stroke: stroke
|
|
43582
|
+
});
|
|
43583
|
+
}
|
|
43545
43584
|
} else if (isIntersect && "none" !== interactInvertType) {
|
|
43585
|
+
if ("background" === interactInvertType) {
|
|
43586
|
+
const fill = smartInvertStrategy(fillStrategy, backgroundColor, invertColor, similarColor);
|
|
43587
|
+
fill && label.setAttributes({
|
|
43588
|
+
fill: fill
|
|
43589
|
+
}), label.setAttributes({
|
|
43590
|
+
stroke: !1,
|
|
43591
|
+
background: backgroundColor,
|
|
43592
|
+
backgroundOpacity: backgroundOpacity
|
|
43593
|
+
});
|
|
43594
|
+
continue;
|
|
43595
|
+
}
|
|
43546
43596
|
if (0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43547
43597
|
if (label.attribute.stroke) {
|
|
43548
43598
|
label.setAttributes({
|
|
@@ -43559,6 +43609,9 @@ class LabelBase extends AnimateComponent {
|
|
|
43559
43609
|
stroke: stroke
|
|
43560
43610
|
});
|
|
43561
43611
|
}
|
|
43612
|
+
!1 === isInside && "background" === interactInvertType && label.setAttributes({
|
|
43613
|
+
background: null
|
|
43614
|
+
});
|
|
43562
43615
|
}
|
|
43563
43616
|
}
|
|
43564
43617
|
_canPlaceInside(textBound, shapeBound) {
|
|
@@ -45613,7 +45666,7 @@ class DataZoomInteraction extends EventEmitter {
|
|
|
45613
45666
|
});
|
|
45614
45667
|
}
|
|
45615
45668
|
clearVGlobalEvents() {
|
|
45616
|
-
("browser" === vglobal.env ? vglobal : this.stage).
|
|
45669
|
+
("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
45617
45670
|
passive: !1
|
|
45618
45671
|
});
|
|
45619
45672
|
}
|
|
@@ -49114,7 +49167,28 @@ class Slider extends AbstractComponent {
|
|
|
49114
49167
|
return graphicCreator.symbol(style);
|
|
49115
49168
|
}
|
|
49116
49169
|
_renderHandlerText(value, position) {
|
|
49117
|
-
|
|
49170
|
+
return graphicCreator.text(this._getHandlerTextAttributes(value, position));
|
|
49171
|
+
}
|
|
49172
|
+
_getHandlerTextStyle(value, position) {
|
|
49173
|
+
const {
|
|
49174
|
+
align: align,
|
|
49175
|
+
handlerSize = 14,
|
|
49176
|
+
handlerText = {},
|
|
49177
|
+
railHeight: railHeight,
|
|
49178
|
+
railWidth: railWidth,
|
|
49179
|
+
slidable: slidable
|
|
49180
|
+
} = this.attribute;
|
|
49181
|
+
return isFunction$1(handlerText.style) ? handlerText.style(value, position, {
|
|
49182
|
+
layout: this.attribute.layout,
|
|
49183
|
+
align: align,
|
|
49184
|
+
railWidth: railWidth,
|
|
49185
|
+
railHeight: railHeight,
|
|
49186
|
+
handlerSize: handlerSize,
|
|
49187
|
+
slidable: slidable
|
|
49188
|
+
}) : handlerText.style;
|
|
49189
|
+
}
|
|
49190
|
+
_getHandlerTextAttributes(value, position) {
|
|
49191
|
+
var _a, _b;
|
|
49118
49192
|
const {
|
|
49119
49193
|
align: align,
|
|
49120
49194
|
handlerSize = 14,
|
|
@@ -49126,13 +49200,13 @@ class Slider extends AbstractComponent {
|
|
|
49126
49200
|
isHorizontal = this._isHorizontal,
|
|
49127
49201
|
pos = this.calculatePosByValue(value, position),
|
|
49128
49202
|
textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
|
|
49203
|
+
handlerTextStyle = this._getHandlerTextStyle(value, position),
|
|
49129
49204
|
textStyle = {
|
|
49130
49205
|
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
|
|
49131
|
-
lineHeight: null
|
|
49206
|
+
lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
|
|
49132
49207
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
49133
49208
|
};
|
|
49134
|
-
isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos);
|
|
49135
|
-
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
49209
|
+
return isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos), Object.assign(Object.assign({}, textStyle), handlerTextStyle);
|
|
49136
49210
|
}
|
|
49137
49211
|
_renderTooltip() {
|
|
49138
49212
|
var _a;
|
|
@@ -49260,31 +49334,19 @@ class Slider extends AbstractComponent {
|
|
|
49260
49334
|
}
|
|
49261
49335
|
}
|
|
49262
49336
|
_updateHandler(handler, position, value) {
|
|
49263
|
-
var _a;
|
|
49264
49337
|
const isHorizontal = this._isHorizontal;
|
|
49265
49338
|
handler.setAttribute(isHorizontal ? "x" : "y", position);
|
|
49266
49339
|
const updateHandlerText = handler.name === SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
|
|
49267
49340
|
if (updateHandlerText) {
|
|
49268
|
-
const
|
|
49269
|
-
|
|
49270
|
-
} = this.attribute;
|
|
49271
|
-
updateHandlerText.setAttributes({
|
|
49272
|
-
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
|
|
49273
|
-
[isHorizontal ? "x" : "y"]: position
|
|
49274
|
-
});
|
|
49341
|
+
const handlerPosition = handler.name === SLIDER_ELEMENT_NAME.startHandler ? "start" : "end";
|
|
49342
|
+
updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49275
49343
|
}
|
|
49276
49344
|
handler.name === SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
|
|
49277
49345
|
}
|
|
49278
49346
|
_updateHandlerText(handlerText, position, value) {
|
|
49279
|
-
var _a;
|
|
49280
49347
|
const isHorizontal = this._isHorizontal,
|
|
49281
|
-
|
|
49282
|
-
|
|
49283
|
-
} = this.attribute;
|
|
49284
|
-
handlerText.setAttributes({
|
|
49285
|
-
[isHorizontal ? "x" : "y"]: position,
|
|
49286
|
-
text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
|
|
49287
|
-
});
|
|
49348
|
+
handlerPosition = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? "start" : "end";
|
|
49349
|
+
handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49288
49350
|
const updateHandler = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
|
|
49289
49351
|
updateHandler && updateHandler.setAttributes({
|
|
49290
49352
|
[isHorizontal ? "x" : "y"]: position
|
|
@@ -49320,7 +49382,7 @@ class Slider extends AbstractComponent {
|
|
|
49320
49382
|
};
|
|
49321
49383
|
}
|
|
49322
49384
|
release(all) {
|
|
49323
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
49385
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
49324
49386
|
passive: !1
|
|
49325
49387
|
}), this._clearAllDragEvents();
|
|
49326
49388
|
}
|
|
@@ -50458,6 +50520,9 @@ class BasePlayer extends AbstractComponent {
|
|
|
50458
50520
|
value: this._data[dataIndex]
|
|
50459
50521
|
});
|
|
50460
50522
|
}
|
|
50523
|
+
release(all) {
|
|
50524
|
+
this._sliderVisible || this._slider.release(all), super.release(all);
|
|
50525
|
+
}
|
|
50461
50526
|
}
|
|
50462
50527
|
BasePlayer.defaultAttributes = {
|
|
50463
50528
|
visible: !0,
|
|
@@ -53057,7 +53122,7 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
53057
53122
|
select: !0
|
|
53058
53123
|
};
|
|
53059
53124
|
|
|
53060
|
-
const version = "1.0.41-alpha.
|
|
53125
|
+
const version = "1.0.41-alpha.3";
|
|
53061
53126
|
preLoadAllModule();
|
|
53062
53127
|
if (isBrowserEnv()) {
|
|
53063
53128
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -637,28 +637,59 @@
|
|
|
637
637
|
}
|
|
638
638
|
addEventListener(type, listener, options) {
|
|
639
639
|
if (!listener) return;
|
|
640
|
+
const capture = this._resolveCapture(options),
|
|
641
|
+
once = this._resolveOnce(options),
|
|
642
|
+
listenerTypeMap = this._getOrCreateListenerTypeMap(type),
|
|
643
|
+
wrappedMap = this._getOrCreateWrappedMap(listenerTypeMap, listener);
|
|
644
|
+
if (wrappedMap.has(capture)) return;
|
|
640
645
|
const wrappedListener = event => {
|
|
641
646
|
const transformedEvent = this._eventListenerTransformer(event);
|
|
642
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
647
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent), once && this._deleteListenerRecord(type, listener, capture);
|
|
643
648
|
};
|
|
644
|
-
|
|
649
|
+
wrappedMap.set(capture, {
|
|
650
|
+
wrappedListener: wrappedListener,
|
|
651
|
+
options: options
|
|
652
|
+
}), this._nativeAddEventListener(type, wrappedListener, options);
|
|
645
653
|
}
|
|
646
654
|
removeEventListener(type, listener, options) {
|
|
647
|
-
var _a;
|
|
655
|
+
var _a, _b;
|
|
648
656
|
if (!listener) return;
|
|
649
|
-
const
|
|
650
|
-
|
|
657
|
+
const capture = this._resolveCapture(options),
|
|
658
|
+
wrappedRecord = null === (_b = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener)) || void 0 === _b ? void 0 : _b.get(capture);
|
|
659
|
+
wrappedRecord && (this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture), this._deleteListenerRecord(type, listener, capture));
|
|
651
660
|
}
|
|
652
661
|
dispatchEvent(event) {
|
|
653
662
|
return this._nativeDispatchEvent(event);
|
|
654
663
|
}
|
|
655
664
|
clearAllEventListeners() {
|
|
656
|
-
this._listenerMap.forEach((
|
|
657
|
-
|
|
658
|
-
|
|
665
|
+
this._listenerMap.forEach((listenerMap, type) => {
|
|
666
|
+
listenerMap.forEach(wrappedMap => {
|
|
667
|
+
wrappedMap.forEach((wrappedRecord, capture) => {
|
|
668
|
+
this._nativeRemoveEventListener(type, wrappedRecord.wrappedListener, capture);
|
|
669
|
+
});
|
|
659
670
|
});
|
|
660
671
|
}), this._listenerMap.clear();
|
|
661
672
|
}
|
|
673
|
+
_resolveCapture(options) {
|
|
674
|
+
return "boolean" == typeof options ? options : !!(null == options ? void 0 : options.capture);
|
|
675
|
+
}
|
|
676
|
+
_resolveOnce(options) {
|
|
677
|
+
return "object" == typeof options && !!(null == options ? void 0 : options.once);
|
|
678
|
+
}
|
|
679
|
+
_getOrCreateListenerTypeMap(type) {
|
|
680
|
+
let listenerTypeMap = this._listenerMap.get(type);
|
|
681
|
+
return listenerTypeMap || (listenerTypeMap = new Map(), this._listenerMap.set(type, listenerTypeMap)), listenerTypeMap;
|
|
682
|
+
}
|
|
683
|
+
_getOrCreateWrappedMap(listenerTypeMap, listener) {
|
|
684
|
+
let wrappedMap = listenerTypeMap.get(listener);
|
|
685
|
+
return wrappedMap || (wrappedMap = new Map(), listenerTypeMap.set(listener, wrappedMap)), wrappedMap;
|
|
686
|
+
}
|
|
687
|
+
_deleteListenerRecord(type, listener, capture) {
|
|
688
|
+
const listenerTypeMap = this._listenerMap.get(type);
|
|
689
|
+
if (!listenerTypeMap) return;
|
|
690
|
+
const wrappedMap = listenerTypeMap.get(listener);
|
|
691
|
+
wrappedMap && (wrappedMap.delete(capture), 0 === wrappedMap.size && listenerTypeMap.delete(listener), 0 === listenerTypeMap.size && this._listenerMap.delete(type));
|
|
692
|
+
}
|
|
662
693
|
_nativeAddEventListener(type, listener, options) {
|
|
663
694
|
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
664
695
|
}
|
|
@@ -7466,7 +7497,9 @@
|
|
|
7466
7497
|
var _a;
|
|
7467
7498
|
if (event.manager !== this) throw new Error("It is illegal to free an event not managed by this EventManager!");
|
|
7468
7499
|
const constructor = event.constructor;
|
|
7469
|
-
this.eventPool.has(constructor) || this.eventPool.
|
|
7500
|
+
this.eventPool.has(constructor) || (this.eventPool.get(constructor).forEach(e => {
|
|
7501
|
+
e.eventPhase = event.NONE, e.currentTarget = null, e.path = [], e.detailPath = [], e.target = null;
|
|
7502
|
+
}), this.eventPool.set(constructor, [])), null === (_a = this.eventPool.get(constructor)) || void 0 === _a || _a.push(event);
|
|
7470
7503
|
}
|
|
7471
7504
|
notifyListeners(e, type) {
|
|
7472
7505
|
const listeners = e.currentTarget._events[type];
|
|
@@ -10270,7 +10303,7 @@
|
|
|
10270
10303
|
});
|
|
10271
10304
|
}
|
|
10272
10305
|
release() {
|
|
10273
|
-
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this);
|
|
10306
|
+
this.releaseStatus = "released", this.stopAnimates(), application.graphicService.onRelease(this), super.release();
|
|
10274
10307
|
}
|
|
10275
10308
|
_emitCustomEvent(type, context) {
|
|
10276
10309
|
var _a, _b;
|
|
@@ -16000,9 +16033,10 @@
|
|
|
16000
16033
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
16001
16034
|
} else {
|
|
16002
16035
|
const {
|
|
16003
|
-
backgroundCornerRadius: backgroundCornerRadius
|
|
16036
|
+
backgroundCornerRadius: backgroundCornerRadius,
|
|
16037
|
+
backgroundOpacity = 1
|
|
16004
16038
|
} = graphic.attribute;
|
|
16005
|
-
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
16039
|
+
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity, context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
16006
16040
|
}
|
|
16007
16041
|
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
16008
16042
|
}
|
|
@@ -18268,12 +18302,12 @@
|
|
|
18268
18302
|
throw new Error("暂不支持");
|
|
18269
18303
|
}
|
|
18270
18304
|
release() {
|
|
18271
|
-
var _a, _b;
|
|
18305
|
+
var _a, _b, _d;
|
|
18272
18306
|
super.release(), this.hooks.beforeRender.unTap("constructor", this.beforeRender), this.hooks.afterRender.unTap("constructor", this.afterRender), this.eventSystem && this.eventSystem.release(), this.layerService.releaseStage(this), this.pluginService.release(), this.forEach(layer => {
|
|
18273
18307
|
layer.release();
|
|
18274
18308
|
}), this.interactiveLayer && (this.interactiveLayer.forEachChildren(item => {
|
|
18275
18309
|
item.setStage && item.setStage(null, null), this.interactiveLayer.removeChild(item);
|
|
18276
|
-
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.renderService.renderTreeRoots = [];
|
|
18310
|
+
}), this.interactiveLayer.release()), this.window.release(), null === (_a = this._ticker) || void 0 === _a || _a.remTimeline(null == this ? void 0 : this.timeline), null === (_b = this._ticker) || void 0 === _b || _b.removeListener("tick", this.afterTickCb), this.params.ticker || null === (_d = this._ticker) || void 0 === _d || _d.release(), this.renderService.renderTreeRoots = [];
|
|
18277
18311
|
}
|
|
18278
18312
|
setStage(stage) {}
|
|
18279
18313
|
dirty(b, matrix) {
|
|
@@ -43529,8 +43563,9 @@
|
|
|
43529
43563
|
const label = labels[i];
|
|
43530
43564
|
if (!label) continue;
|
|
43531
43565
|
const baseMark = this.getRelatedGraphic(label.attribute);
|
|
43532
|
-
let backgroundColor = baseMark.getAttributes(!0).fill
|
|
43533
|
-
|
|
43566
|
+
let backgroundColor = baseMark.getAttributes(!0).fill;
|
|
43567
|
+
const backgroundOpacity = baseMark.getAttributes(!0).fillOpacity;
|
|
43568
|
+
let foregroundColor = label.attribute.fill;
|
|
43534
43569
|
if (isObject$1(backgroundColor) && backgroundColor.gradient) {
|
|
43535
43570
|
const firstStopColor = null === (_g = null === (_f = backgroundColor.stops) || void 0 === _f ? void 0 : _f[0]) || void 0 === _g ? void 0 : _g.color;
|
|
43536
43571
|
firstStopColor && (backgroundColor = firstStopColor, foregroundColor = firstStopColor);
|
|
@@ -43544,11 +43579,26 @@
|
|
|
43544
43579
|
if (fill && label.setAttributes({
|
|
43545
43580
|
fill: fill
|
|
43546
43581
|
}), 0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43547
|
-
|
|
43548
|
-
|
|
43549
|
-
|
|
43550
|
-
|
|
43582
|
+
if ("background" === interactInvertType) label.setAttributes({
|
|
43583
|
+
stroke: !1
|
|
43584
|
+
});else {
|
|
43585
|
+
const stroke = smartInvertStrategy(strokeStrategy, backgroundColor, invertColor, similarColor);
|
|
43586
|
+
stroke && label.setAttributes({
|
|
43587
|
+
stroke: stroke
|
|
43588
|
+
});
|
|
43589
|
+
}
|
|
43551
43590
|
} else if (isIntersect && "none" !== interactInvertType) {
|
|
43591
|
+
if ("background" === interactInvertType) {
|
|
43592
|
+
const fill = smartInvertStrategy(fillStrategy, backgroundColor, invertColor, similarColor);
|
|
43593
|
+
fill && label.setAttributes({
|
|
43594
|
+
fill: fill
|
|
43595
|
+
}), label.setAttributes({
|
|
43596
|
+
stroke: !1,
|
|
43597
|
+
background: backgroundColor,
|
|
43598
|
+
backgroundOpacity: backgroundOpacity
|
|
43599
|
+
});
|
|
43600
|
+
continue;
|
|
43601
|
+
}
|
|
43552
43602
|
if (0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43553
43603
|
if (label.attribute.stroke) {
|
|
43554
43604
|
label.setAttributes({
|
|
@@ -43565,6 +43615,9 @@
|
|
|
43565
43615
|
stroke: stroke
|
|
43566
43616
|
});
|
|
43567
43617
|
}
|
|
43618
|
+
!1 === isInside && "background" === interactInvertType && label.setAttributes({
|
|
43619
|
+
background: null
|
|
43620
|
+
});
|
|
43568
43621
|
}
|
|
43569
43622
|
}
|
|
43570
43623
|
_canPlaceInside(textBound, shapeBound) {
|
|
@@ -45619,7 +45672,7 @@
|
|
|
45619
45672
|
});
|
|
45620
45673
|
}
|
|
45621
45674
|
clearVGlobalEvents() {
|
|
45622
|
-
("browser" === vglobal.env ? vglobal : this.stage).
|
|
45675
|
+
("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
45623
45676
|
passive: !1
|
|
45624
45677
|
});
|
|
45625
45678
|
}
|
|
@@ -49120,7 +49173,28 @@
|
|
|
49120
49173
|
return graphicCreator.symbol(style);
|
|
49121
49174
|
}
|
|
49122
49175
|
_renderHandlerText(value, position) {
|
|
49123
|
-
|
|
49176
|
+
return graphicCreator.text(this._getHandlerTextAttributes(value, position));
|
|
49177
|
+
}
|
|
49178
|
+
_getHandlerTextStyle(value, position) {
|
|
49179
|
+
const {
|
|
49180
|
+
align: align,
|
|
49181
|
+
handlerSize = 14,
|
|
49182
|
+
handlerText = {},
|
|
49183
|
+
railHeight: railHeight,
|
|
49184
|
+
railWidth: railWidth,
|
|
49185
|
+
slidable: slidable
|
|
49186
|
+
} = this.attribute;
|
|
49187
|
+
return isFunction$1(handlerText.style) ? handlerText.style(value, position, {
|
|
49188
|
+
layout: this.attribute.layout,
|
|
49189
|
+
align: align,
|
|
49190
|
+
railWidth: railWidth,
|
|
49191
|
+
railHeight: railHeight,
|
|
49192
|
+
handlerSize: handlerSize,
|
|
49193
|
+
slidable: slidable
|
|
49194
|
+
}) : handlerText.style;
|
|
49195
|
+
}
|
|
49196
|
+
_getHandlerTextAttributes(value, position) {
|
|
49197
|
+
var _a, _b;
|
|
49124
49198
|
const {
|
|
49125
49199
|
align: align,
|
|
49126
49200
|
handlerSize = 14,
|
|
@@ -49132,13 +49206,13 @@
|
|
|
49132
49206
|
isHorizontal = this._isHorizontal,
|
|
49133
49207
|
pos = this.calculatePosByValue(value, position),
|
|
49134
49208
|
textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
|
|
49209
|
+
handlerTextStyle = this._getHandlerTextStyle(value, position),
|
|
49135
49210
|
textStyle = {
|
|
49136
49211
|
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
|
|
49137
|
-
lineHeight: null
|
|
49212
|
+
lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
|
|
49138
49213
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
49139
49214
|
};
|
|
49140
|
-
isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos);
|
|
49141
|
-
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
49215
|
+
return isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos), Object.assign(Object.assign({}, textStyle), handlerTextStyle);
|
|
49142
49216
|
}
|
|
49143
49217
|
_renderTooltip() {
|
|
49144
49218
|
var _a;
|
|
@@ -49266,31 +49340,19 @@
|
|
|
49266
49340
|
}
|
|
49267
49341
|
}
|
|
49268
49342
|
_updateHandler(handler, position, value) {
|
|
49269
|
-
var _a;
|
|
49270
49343
|
const isHorizontal = this._isHorizontal;
|
|
49271
49344
|
handler.setAttribute(isHorizontal ? "x" : "y", position);
|
|
49272
49345
|
const updateHandlerText = handler.name === exports.SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
|
|
49273
49346
|
if (updateHandlerText) {
|
|
49274
|
-
const
|
|
49275
|
-
|
|
49276
|
-
} = this.attribute;
|
|
49277
|
-
updateHandlerText.setAttributes({
|
|
49278
|
-
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
|
|
49279
|
-
[isHorizontal ? "x" : "y"]: position
|
|
49280
|
-
});
|
|
49347
|
+
const handlerPosition = handler.name === exports.SLIDER_ELEMENT_NAME.startHandler ? "start" : "end";
|
|
49348
|
+
updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49281
49349
|
}
|
|
49282
49350
|
handler.name === exports.SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
|
|
49283
49351
|
}
|
|
49284
49352
|
_updateHandlerText(handlerText, position, value) {
|
|
49285
|
-
var _a;
|
|
49286
49353
|
const isHorizontal = this._isHorizontal,
|
|
49287
|
-
|
|
49288
|
-
|
|
49289
|
-
} = this.attribute;
|
|
49290
|
-
handlerText.setAttributes({
|
|
49291
|
-
[isHorizontal ? "x" : "y"]: position,
|
|
49292
|
-
text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
|
|
49293
|
-
});
|
|
49354
|
+
handlerPosition = handlerText.name === exports.SLIDER_ELEMENT_NAME.startHandlerText ? "start" : "end";
|
|
49355
|
+
handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49294
49356
|
const updateHandler = handlerText.name === exports.SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
|
|
49295
49357
|
updateHandler && updateHandler.setAttributes({
|
|
49296
49358
|
[isHorizontal ? "x" : "y"]: position
|
|
@@ -49326,7 +49388,7 @@
|
|
|
49326
49388
|
};
|
|
49327
49389
|
}
|
|
49328
49390
|
release(all) {
|
|
49329
|
-
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).
|
|
49391
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
|
|
49330
49392
|
passive: !1
|
|
49331
49393
|
}), this._clearAllDragEvents();
|
|
49332
49394
|
}
|
|
@@ -50464,6 +50526,9 @@
|
|
|
50464
50526
|
value: this._data[dataIndex]
|
|
50465
50527
|
});
|
|
50466
50528
|
}
|
|
50529
|
+
release(all) {
|
|
50530
|
+
this._sliderVisible || this._slider.release(all), super.release(all);
|
|
50531
|
+
}
|
|
50467
50532
|
}
|
|
50468
50533
|
BasePlayer.defaultAttributes = {
|
|
50469
50534
|
visible: !0,
|
|
@@ -53063,7 +53128,7 @@
|
|
|
53063
53128
|
select: !0
|
|
53064
53129
|
};
|
|
53065
53130
|
|
|
53066
|
-
const version = "1.0.41-alpha.
|
|
53131
|
+
const version = "1.0.41-alpha.3";
|
|
53067
53132
|
preLoadAllModule();
|
|
53068
53133
|
if (isBrowserEnv()) {
|
|
53069
53134
|
loadBrowserEnv(container);
|