@visactor/vrender 1.0.43-alpha.0 → 1.0.43-alpha.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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +63 -74
- package/dist/index.js +63 -74
- 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 +6 -6
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.43-alpha.
|
|
24
|
+
exports.version = "1.0.43-alpha.1", (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.43-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.43-alpha.1\";\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
|
@@ -31720,6 +31720,11 @@ class RAFTickHandler {
|
|
|
31720
31720
|
}
|
|
31721
31721
|
}
|
|
31722
31722
|
class DefaultTicker extends EventEmitter {
|
|
31723
|
+
pushFrameTime(time) {
|
|
31724
|
+
this.frameTimeHistory.push(time);
|
|
31725
|
+
const overflow = this.frameTimeHistory.length - 600;
|
|
31726
|
+
overflow > 0 && this.frameTimeHistory.splice(0, overflow);
|
|
31727
|
+
}
|
|
31723
31728
|
constructor(stage) {
|
|
31724
31729
|
super(), this.timelines = [], this.frameTimeHistory = [], this.handleTick = (handler, params) => {
|
|
31725
31730
|
const {
|
|
@@ -31727,10 +31732,10 @@ class DefaultTicker extends EventEmitter {
|
|
|
31727
31732
|
} = null != params ? params : {};
|
|
31728
31733
|
if (this.ifCanStop()) return this.stop(), !1;
|
|
31729
31734
|
const currentTime = handler.getTime();
|
|
31730
|
-
this._lastTickTime = currentTime, this.lastFrameTime < 0 && (this.lastFrameTime = currentTime - this.interval + this.timeOffset, this.
|
|
31735
|
+
this._lastTickTime = currentTime, this.lastFrameTime < 0 && (this.lastFrameTime = currentTime - this.interval + this.timeOffset, this.pushFrameTime(this.lastFrameTime));
|
|
31731
31736
|
const delta = currentTime - this.lastFrameTime,
|
|
31732
31737
|
skip = this.checkSkip(delta);
|
|
31733
|
-
return skip || (this._handlerTick(delta), this.lastFrameTime = currentTime, this.
|
|
31738
|
+
return skip || (this._handlerTick(delta), this.lastFrameTime = currentTime, this.pushFrameTime(this.lastFrameTime)), once || handler.tick(this.interval, this.handleTick), !skip;
|
|
31734
31739
|
}, this._handlerTick = delta => {
|
|
31735
31740
|
this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
|
|
31736
31741
|
timeline.tick(delta);
|
|
@@ -31822,7 +31827,7 @@ class DefaultTicker extends EventEmitter {
|
|
|
31822
31827
|
}
|
|
31823
31828
|
release() {
|
|
31824
31829
|
var _a;
|
|
31825
|
-
this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
|
|
31830
|
+
this.stop(), this.timelines = [], this.frameTimeHistory.length = 0, null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
|
|
31826
31831
|
}
|
|
31827
31832
|
checkSkip(delta) {
|
|
31828
31833
|
var _a, _b, _c;
|
|
@@ -44967,16 +44972,6 @@ const DEFAULT_HANDLER_ATTR_MAP = {
|
|
|
44967
44972
|
strokeBoundsBuffer: 0
|
|
44968
44973
|
}
|
|
44969
44974
|
};
|
|
44970
|
-
const LAYOUT_LEVEL = {
|
|
44971
|
-
background: 0,
|
|
44972
|
-
preview: 1,
|
|
44973
|
-
dragMask: 2,
|
|
44974
|
-
selectedBackground: 3,
|
|
44975
|
-
selectedPreview: 4,
|
|
44976
|
-
handler: 5,
|
|
44977
|
-
handlerText: 5,
|
|
44978
|
-
handlerMask: 999
|
|
44979
|
-
};
|
|
44980
44975
|
|
|
44981
44976
|
const isTextOverflow = (componentBoundsLike, textBounds, layout, isHorizontal) => {
|
|
44982
44977
|
if (!textBounds) return !1;
|
|
@@ -45108,14 +45103,12 @@ class DataZoomRenderer {
|
|
|
45108
45103
|
x: position.x + start * width,
|
|
45109
45104
|
y: position.y,
|
|
45110
45105
|
width: (end - start) * width,
|
|
45111
|
-
height: height
|
|
45112
|
-
zIndex: LAYOUT_LEVEL.dragMask
|
|
45106
|
+
height: height
|
|
45113
45107
|
}, dragMaskStyle), "rect") : this._dragMask = this._getContainer().createOrUpdateChild("dragMask", Object.assign({
|
|
45114
45108
|
x: position.x,
|
|
45115
45109
|
y: position.y + start * height,
|
|
45116
45110
|
width: width,
|
|
45117
|
-
height: (end - start) * height
|
|
45118
|
-
zIndex: LAYOUT_LEVEL.dragMask
|
|
45111
|
+
height: (end - start) * height
|
|
45119
45112
|
}, dragMaskStyle), "rect"), {
|
|
45120
45113
|
start: start,
|
|
45121
45114
|
end: end
|
|
@@ -45139,8 +45132,7 @@ class DataZoomRenderer {
|
|
|
45139
45132
|
y: position.y,
|
|
45140
45133
|
width: width,
|
|
45141
45134
|
height: height,
|
|
45142
|
-
cursor: brushSelect ? "crosshair" : "auto"
|
|
45143
|
-
zIndex: LAYOUT_LEVEL.background
|
|
45135
|
+
cursor: brushSelect ? "crosshair" : "auto"
|
|
45144
45136
|
}, backgroundStyle), {
|
|
45145
45137
|
pickable: !zoomLock && (null === (_a = backgroundStyle.pickable) || void 0 === _a || _a)
|
|
45146
45138
|
}), "rect");
|
|
@@ -45173,8 +45165,7 @@ class DataZoomRenderer {
|
|
|
45173
45165
|
x: position.x + start * width,
|
|
45174
45166
|
y: position.y - middleHandlerBackgroundSize,
|
|
45175
45167
|
width: (end - start) * width,
|
|
45176
|
-
height: middleHandlerBackgroundSize
|
|
45177
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45168
|
+
height: middleHandlerBackgroundSize
|
|
45178
45169
|
}, null === (_d = middleHandlerStyle.background) || void 0 === _d ? void 0 : _d.style), {
|
|
45179
45170
|
pickable: !zoomLock && (null === (_g = null === (_f = null === (_e = middleHandlerStyle.background) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.pickable) || void 0 === _g || _g)
|
|
45180
45171
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
@@ -45182,29 +45173,24 @@ class DataZoomRenderer {
|
|
|
45182
45173
|
y: position.y - middleHandlerBackgroundSize / 2,
|
|
45183
45174
|
strokeBoundsBuffer: 0,
|
|
45184
45175
|
angle: 0,
|
|
45185
|
-
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square"
|
|
45186
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45176
|
+
symbolType: null !== (_j = null === (_h = middleHandlerStyle.icon) || void 0 === _h ? void 0 : _h.symbolType) && void 0 !== _j ? _j : "square"
|
|
45187
45177
|
}, middleHandlerStyle.icon), {
|
|
45188
45178
|
pickable: !zoomLock && (null === (_k = middleHandlerStyle.icon.pickable) || void 0 === _k || _k)
|
|
45189
45179
|
}), "symbol");
|
|
45190
45180
|
}
|
|
45191
|
-
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign(
|
|
45181
|
+
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
45192
45182
|
x: position.x + start * width,
|
|
45193
45183
|
y: position.y + height / 2,
|
|
45194
45184
|
size: height,
|
|
45195
45185
|
symbolType: null !== (_l = startHandlerStyle.symbolType) && void 0 !== _l ? _l : "square"
|
|
45196
|
-
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45197
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45198
|
-
}), startHandlerStyle), {
|
|
45186
|
+
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), {
|
|
45199
45187
|
pickable: !zoomLock && (null === (_m = startHandlerStyle.pickable) || void 0 === _m || _m)
|
|
45200
|
-
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign(
|
|
45188
|
+
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
45201
45189
|
x: position.x + end * width,
|
|
45202
45190
|
y: position.y + height / 2,
|
|
45203
45191
|
size: height,
|
|
45204
45192
|
symbolType: null !== (_o = endHandlerStyle.symbolType) && void 0 !== _o ? _o : "square"
|
|
45205
|
-
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45206
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45207
|
-
}), endHandlerStyle), {
|
|
45193
|
+
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), {
|
|
45208
45194
|
pickable: !zoomLock && (null === (_p = endHandlerStyle.pickable) || void 0 === _p || _p)
|
|
45209
45195
|
}), "symbol");
|
|
45210
45196
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize),
|
|
@@ -45218,7 +45204,7 @@ class DataZoomRenderer {
|
|
|
45218
45204
|
height: startHandlerHeight,
|
|
45219
45205
|
fill: "white",
|
|
45220
45206
|
fillOpacity: 0,
|
|
45221
|
-
zIndex:
|
|
45207
|
+
zIndex: 999
|
|
45222
45208
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45223
45209
|
pickable: !zoomLock
|
|
45224
45210
|
}), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
|
|
@@ -45228,7 +45214,7 @@ class DataZoomRenderer {
|
|
|
45228
45214
|
height: endHandlerHeight,
|
|
45229
45215
|
fill: "white",
|
|
45230
45216
|
fillOpacity: 0,
|
|
45231
|
-
zIndex:
|
|
45217
|
+
zIndex: 999
|
|
45232
45218
|
}, DEFAULT_HANDLER_ATTR_MAP.horizontal), {
|
|
45233
45219
|
pickable: !zoomLock
|
|
45234
45220
|
}), "rect");
|
|
@@ -45239,8 +45225,7 @@ class DataZoomRenderer {
|
|
|
45239
45225
|
x: "left" === orient ? position.x - middleHandlerBackgroundSize : position.x + width,
|
|
45240
45226
|
y: position.y + start * height,
|
|
45241
45227
|
width: middleHandlerBackgroundSize,
|
|
45242
|
-
height: (end - start) * height
|
|
45243
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45228
|
+
height: (end - start) * height
|
|
45244
45229
|
}, null === (_r = middleHandlerStyle.background) || void 0 === _r ? void 0 : _r.style), {
|
|
45245
45230
|
pickable: !zoomLock && (null === (_u = null === (_t = null === (_s = middleHandlerStyle.background) || void 0 === _s ? void 0 : _s.style) || void 0 === _t ? void 0 : _t.pickable) || void 0 === _u || _u)
|
|
45246
45231
|
}), "rect"), this._middleHandlerSymbol = group.createOrUpdateChild("middleHandlerSymbol", Object.assign(Object.assign({
|
|
@@ -45248,27 +45233,23 @@ class DataZoomRenderer {
|
|
|
45248
45233
|
y: position.y + (start + end) / 2 * height,
|
|
45249
45234
|
angle: Math.PI / 180 * 90,
|
|
45250
45235
|
symbolType: null !== (_w = null === (_v = middleHandlerStyle.icon) || void 0 === _v ? void 0 : _v.symbolType) && void 0 !== _w ? _w : "square",
|
|
45251
|
-
strokeBoundsBuffer: 0
|
|
45252
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45236
|
+
strokeBoundsBuffer: 0
|
|
45253
45237
|
}, middleHandlerStyle.icon), {
|
|
45254
45238
|
pickable: !zoomLock && (null === (_y = null === (_x = middleHandlerStyle.icon) || void 0 === _x ? void 0 : _x.pickable) || void 0 === _y || _y)
|
|
45255
45239
|
}), "symbol");
|
|
45256
45240
|
}
|
|
45257
|
-
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign(
|
|
45241
|
+
this._startHandler = group.createOrUpdateChild("startHandler", Object.assign(Object.assign(Object.assign({
|
|
45258
45242
|
x: position.x + width / 2,
|
|
45259
45243
|
y: position.y + start * height,
|
|
45260
45244
|
size: width,
|
|
45261
45245
|
symbolType: null !== (_z = startHandlerStyle.symbolType) && void 0 !== _z ? _z : "square"
|
|
45262
|
-
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45263
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45264
|
-
}), startHandlerStyle), {
|
|
45246
|
+
}, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), {
|
|
45265
45247
|
pickable: !zoomLock && (null === (_0 = startHandlerStyle.pickable) || void 0 === _0 || _0)
|
|
45266
45248
|
}), "symbol"), this._endHandler = group.createOrUpdateChild("endHandler", Object.assign(Object.assign(Object.assign({
|
|
45267
45249
|
x: position.x + width / 2,
|
|
45268
45250
|
y: position.y + end * height,
|
|
45269
45251
|
size: width,
|
|
45270
|
-
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square"
|
|
45271
|
-
zIndex: LAYOUT_LEVEL.handler
|
|
45252
|
+
symbolType: null !== (_1 = endHandlerStyle.symbolType) && void 0 !== _1 ? _1 : "square"
|
|
45272
45253
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), {
|
|
45273
45254
|
pickable: !zoomLock && (null === (_2 = endHandlerStyle.pickable) || void 0 === _2 || _2)
|
|
45274
45255
|
}), "symbol");
|
|
@@ -45283,7 +45264,7 @@ class DataZoomRenderer {
|
|
|
45283
45264
|
height: endHandlerWidth,
|
|
45284
45265
|
fill: "white",
|
|
45285
45266
|
fillOpacity: 0,
|
|
45286
|
-
zIndex:
|
|
45267
|
+
zIndex: 999
|
|
45287
45268
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45288
45269
|
pickable: !zoomLock
|
|
45289
45270
|
}), "rect"), this._endHandlerMask = group.createOrUpdateChild("endHandlerMask", Object.assign(Object.assign({
|
|
@@ -45293,7 +45274,7 @@ class DataZoomRenderer {
|
|
|
45293
45274
|
height: endHandlerWidth,
|
|
45294
45275
|
fill: "white",
|
|
45295
45276
|
fillOpacity: 0,
|
|
45296
|
-
zIndex:
|
|
45277
|
+
zIndex: 999
|
|
45297
45278
|
}, DEFAULT_HANDLER_ATTR_MAP.vertical), {
|
|
45298
45279
|
pickable: !zoomLock
|
|
45299
45280
|
}), "rect");
|
|
@@ -45322,8 +45303,7 @@ class DataZoomRenderer {
|
|
|
45322
45303
|
y: position.y,
|
|
45323
45304
|
width: (end - start) * width,
|
|
45324
45305
|
height: height,
|
|
45325
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
45326
|
-
zIndex: LAYOUT_LEVEL.selectedBackground
|
|
45306
|
+
cursor: brushSelect ? "crosshair" : "move"
|
|
45327
45307
|
}, selectedBackgroundStyle), {
|
|
45328
45308
|
pickable: !zoomLock && (null === (_a = selectedBackgroundChartStyle.pickable) || void 0 === _a || _a)
|
|
45329
45309
|
}), "rect") : this._selectedBackground = group.createOrUpdateChild("selectedBackground", Object.assign(Object.assign({
|
|
@@ -45331,16 +45311,14 @@ class DataZoomRenderer {
|
|
|
45331
45311
|
y: position.y + start * height,
|
|
45332
45312
|
width: width,
|
|
45333
45313
|
height: (end - start) * height,
|
|
45334
|
-
cursor: brushSelect ? "crosshair" : "move"
|
|
45335
|
-
zIndex: LAYOUT_LEVEL.selectedBackground
|
|
45314
|
+
cursor: brushSelect ? "crosshair" : "move"
|
|
45336
45315
|
}, selectedBackgroundStyle), {
|
|
45337
45316
|
pickable: !zoomLock && (null === (_b = selectedBackgroundStyle.pickable) || void 0 === _b || _b)
|
|
45338
45317
|
}), "rect");
|
|
45339
45318
|
}
|
|
45340
45319
|
_setPreviewAttributes(type, group) {
|
|
45341
45320
|
this._previewGroup || (this._previewGroup = group.createOrUpdateChild("previewGroup", {
|
|
45342
|
-
pickable: !1
|
|
45343
|
-
zIndex: LAYOUT_LEVEL.preview
|
|
45321
|
+
pickable: !1
|
|
45344
45322
|
}, "group")), "line" === type ? this._previewLine = this._previewGroup.createOrUpdateChild("previewLine", {}, "line") : this._previewArea = this._previewGroup.createOrUpdateChild("previewArea", {
|
|
45345
45323
|
curveType: "basis"
|
|
45346
45324
|
}, "area");
|
|
@@ -45359,8 +45337,7 @@ class DataZoomRenderer {
|
|
|
45359
45337
|
}
|
|
45360
45338
|
_setSelectedPreviewClipAttributes(type, group) {
|
|
45361
45339
|
this._selectedPreviewGroupClip || (this._selectedPreviewGroupClip = group.createOrUpdateChild("selectedPreviewGroupClip", {
|
|
45362
|
-
pickable: !1
|
|
45363
|
-
zIndex: LAYOUT_LEVEL.selectedPreview
|
|
45340
|
+
pickable: !1
|
|
45364
45341
|
}, "group"), this._selectedPreviewGroup = this._selectedPreviewGroupClip.createOrUpdateChild("selectedPreviewGroup", {}, "group"));
|
|
45365
45342
|
const {
|
|
45366
45343
|
start: start,
|
|
@@ -49195,7 +49172,31 @@ class Slider extends AbstractComponent {
|
|
|
49195
49172
|
return graphicCreator.symbol(style);
|
|
49196
49173
|
}
|
|
49197
49174
|
_renderHandlerText(value, position) {
|
|
49198
|
-
|
|
49175
|
+
return graphicCreator.text(this._getHandlerTextAttributes(value, position));
|
|
49176
|
+
}
|
|
49177
|
+
_getHandlerPosition(isStart) {
|
|
49178
|
+
return this.attribute.range && isStart ? "start" : "end";
|
|
49179
|
+
}
|
|
49180
|
+
_getHandlerTextStyle(value, position) {
|
|
49181
|
+
const {
|
|
49182
|
+
align: align,
|
|
49183
|
+
handlerSize = 14,
|
|
49184
|
+
handlerText = {},
|
|
49185
|
+
railHeight: railHeight,
|
|
49186
|
+
railWidth: railWidth,
|
|
49187
|
+
slidable: slidable
|
|
49188
|
+
} = this.attribute;
|
|
49189
|
+
return isFunction$1(handlerText.style) ? handlerText.style(value, position, {
|
|
49190
|
+
layout: this.attribute.layout,
|
|
49191
|
+
align: align,
|
|
49192
|
+
railWidth: railWidth,
|
|
49193
|
+
railHeight: railHeight,
|
|
49194
|
+
handlerSize: handlerSize,
|
|
49195
|
+
slidable: slidable
|
|
49196
|
+
}) : handlerText.style;
|
|
49197
|
+
}
|
|
49198
|
+
_getHandlerTextAttributes(value, position) {
|
|
49199
|
+
var _a, _b;
|
|
49199
49200
|
const {
|
|
49200
49201
|
align: align,
|
|
49201
49202
|
handlerSize = 14,
|
|
@@ -49207,13 +49208,13 @@ class Slider extends AbstractComponent {
|
|
|
49207
49208
|
isHorizontal = this._isHorizontal,
|
|
49208
49209
|
pos = this.calculatePosByValue(value, position),
|
|
49209
49210
|
textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
|
|
49211
|
+
handlerTextStyle = this._getHandlerTextStyle(value, position),
|
|
49210
49212
|
textStyle = {
|
|
49211
49213
|
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
|
|
49212
|
-
lineHeight: null
|
|
49214
|
+
lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
|
|
49213
49215
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
49214
49216
|
};
|
|
49215
|
-
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);
|
|
49216
|
-
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
49217
|
+
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);
|
|
49217
49218
|
}
|
|
49218
49219
|
_renderTooltip() {
|
|
49219
49220
|
var _a;
|
|
@@ -49341,31 +49342,19 @@ class Slider extends AbstractComponent {
|
|
|
49341
49342
|
}
|
|
49342
49343
|
}
|
|
49343
49344
|
_updateHandler(handler, position, value) {
|
|
49344
|
-
var _a;
|
|
49345
49345
|
const isHorizontal = this._isHorizontal;
|
|
49346
49346
|
handler.setAttribute(isHorizontal ? "x" : "y", position);
|
|
49347
49347
|
const updateHandlerText = handler.name === SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
|
|
49348
49348
|
if (updateHandlerText) {
|
|
49349
|
-
const
|
|
49350
|
-
|
|
49351
|
-
} = this.attribute;
|
|
49352
|
-
updateHandlerText.setAttributes({
|
|
49353
|
-
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
|
|
49354
|
-
[isHorizontal ? "x" : "y"]: position
|
|
49355
|
-
});
|
|
49349
|
+
const handlerPosition = this._getHandlerPosition(handler.name === SLIDER_ELEMENT_NAME.startHandler);
|
|
49350
|
+
updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49356
49351
|
}
|
|
49357
49352
|
handler.name === SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
|
|
49358
49353
|
}
|
|
49359
49354
|
_updateHandlerText(handlerText, position, value) {
|
|
49360
|
-
var _a;
|
|
49361
49355
|
const isHorizontal = this._isHorizontal,
|
|
49362
|
-
|
|
49363
|
-
|
|
49364
|
-
} = this.attribute;
|
|
49365
|
-
handlerText.setAttributes({
|
|
49366
|
-
[isHorizontal ? "x" : "y"]: position,
|
|
49367
|
-
text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
|
|
49368
|
-
});
|
|
49356
|
+
handlerPosition = this._getHandlerPosition(handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText);
|
|
49357
|
+
handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49369
49358
|
const updateHandler = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
|
|
49370
49359
|
updateHandler && updateHandler.setAttributes({
|
|
49371
49360
|
[isHorizontal ? "x" : "y"]: position
|
|
@@ -53141,7 +53130,7 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
53141
53130
|
select: !0
|
|
53142
53131
|
};
|
|
53143
53132
|
|
|
53144
|
-
const version = "1.0.43-alpha.
|
|
53133
|
+
const version = "1.0.43-alpha.1";
|
|
53145
53134
|
preLoadAllModule();
|
|
53146
53135
|
if (isBrowserEnv()) {
|
|
53147
53136
|
loadBrowserEnv(container);
|