@visactor/vrender 1.0.41 → 1.0.42
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 +61 -29
- package/dist/index.js +61 -29
- 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.
|
|
24
|
+
exports.version = "1.0.42", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
25
|
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
26
|
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
27
|
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
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,QAAQ,CAAC;AAEhC,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.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAChC,+DAAmF;AAEtE,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,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.42\";\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
|
@@ -16027,9 +16027,10 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
16027
16027
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
16028
16028
|
} else {
|
|
16029
16029
|
const {
|
|
16030
|
-
backgroundCornerRadius: backgroundCornerRadius
|
|
16030
|
+
backgroundCornerRadius: backgroundCornerRadius,
|
|
16031
|
+
backgroundOpacity = 1
|
|
16031
16032
|
} = graphic.attribute;
|
|
16032
|
-
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();
|
|
16033
16034
|
}
|
|
16034
16035
|
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
16035
16036
|
}
|
|
@@ -43556,8 +43557,9 @@ class LabelBase extends AnimateComponent {
|
|
|
43556
43557
|
const label = labels[i];
|
|
43557
43558
|
if (!label) continue;
|
|
43558
43559
|
const baseMark = this.getRelatedGraphic(label.attribute);
|
|
43559
|
-
let backgroundColor = baseMark.getAttributes(!0).fill
|
|
43560
|
-
|
|
43560
|
+
let backgroundColor = baseMark.getAttributes(!0).fill;
|
|
43561
|
+
const backgroundOpacity = baseMark.getAttributes(!0).fillOpacity;
|
|
43562
|
+
let foregroundColor = label.attribute.fill;
|
|
43561
43563
|
if (isObject$1(backgroundColor) && backgroundColor.gradient) {
|
|
43562
43564
|
const firstStopColor = null === (_g = null === (_f = backgroundColor.stops) || void 0 === _f ? void 0 : _f[0]) || void 0 === _g ? void 0 : _g.color;
|
|
43563
43565
|
firstStopColor && (backgroundColor = firstStopColor, foregroundColor = firstStopColor);
|
|
@@ -43571,11 +43573,26 @@ class LabelBase extends AnimateComponent {
|
|
|
43571
43573
|
if (fill && label.setAttributes({
|
|
43572
43574
|
fill: fill
|
|
43573
43575
|
}), 0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43574
|
-
|
|
43575
|
-
|
|
43576
|
-
|
|
43577
|
-
|
|
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
|
+
}
|
|
43578
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
|
+
}
|
|
43579
43596
|
if (0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43580
43597
|
if (label.attribute.stroke) {
|
|
43581
43598
|
label.setAttributes({
|
|
@@ -43592,6 +43609,9 @@ class LabelBase extends AnimateComponent {
|
|
|
43592
43609
|
stroke: stroke
|
|
43593
43610
|
});
|
|
43594
43611
|
}
|
|
43612
|
+
!1 === isInside && "background" === interactInvertType && label.setAttributes({
|
|
43613
|
+
background: null
|
|
43614
|
+
});
|
|
43595
43615
|
}
|
|
43596
43616
|
}
|
|
43597
43617
|
_canPlaceInside(textBound, shapeBound) {
|
|
@@ -49147,7 +49167,31 @@ class Slider extends AbstractComponent {
|
|
|
49147
49167
|
return graphicCreator.symbol(style);
|
|
49148
49168
|
}
|
|
49149
49169
|
_renderHandlerText(value, position) {
|
|
49150
|
-
|
|
49170
|
+
return graphicCreator.text(this._getHandlerTextAttributes(value, position));
|
|
49171
|
+
}
|
|
49172
|
+
_getHandlerPosition(isStart) {
|
|
49173
|
+
return this.attribute.range && isStart ? "start" : "end";
|
|
49174
|
+
}
|
|
49175
|
+
_getHandlerTextStyle(value, position) {
|
|
49176
|
+
const {
|
|
49177
|
+
align: align,
|
|
49178
|
+
handlerSize = 14,
|
|
49179
|
+
handlerText = {},
|
|
49180
|
+
railHeight: railHeight,
|
|
49181
|
+
railWidth: railWidth,
|
|
49182
|
+
slidable: slidable
|
|
49183
|
+
} = this.attribute;
|
|
49184
|
+
return isFunction$1(handlerText.style) ? handlerText.style(value, position, {
|
|
49185
|
+
layout: this.attribute.layout,
|
|
49186
|
+
align: align,
|
|
49187
|
+
railWidth: railWidth,
|
|
49188
|
+
railHeight: railHeight,
|
|
49189
|
+
handlerSize: handlerSize,
|
|
49190
|
+
slidable: slidable
|
|
49191
|
+
}) : handlerText.style;
|
|
49192
|
+
}
|
|
49193
|
+
_getHandlerTextAttributes(value, position) {
|
|
49194
|
+
var _a, _b;
|
|
49151
49195
|
const {
|
|
49152
49196
|
align: align,
|
|
49153
49197
|
handlerSize = 14,
|
|
@@ -49159,13 +49203,13 @@ class Slider extends AbstractComponent {
|
|
|
49159
49203
|
isHorizontal = this._isHorizontal,
|
|
49160
49204
|
pos = this.calculatePosByValue(value, position),
|
|
49161
49205
|
textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
|
|
49206
|
+
handlerTextStyle = this._getHandlerTextStyle(value, position),
|
|
49162
49207
|
textStyle = {
|
|
49163
49208
|
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
|
|
49164
|
-
lineHeight: null
|
|
49209
|
+
lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
|
|
49165
49210
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
49166
49211
|
};
|
|
49167
|
-
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);
|
|
49168
|
-
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
49212
|
+
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);
|
|
49169
49213
|
}
|
|
49170
49214
|
_renderTooltip() {
|
|
49171
49215
|
var _a;
|
|
@@ -49293,31 +49337,19 @@ class Slider extends AbstractComponent {
|
|
|
49293
49337
|
}
|
|
49294
49338
|
}
|
|
49295
49339
|
_updateHandler(handler, position, value) {
|
|
49296
|
-
var _a;
|
|
49297
49340
|
const isHorizontal = this._isHorizontal;
|
|
49298
49341
|
handler.setAttribute(isHorizontal ? "x" : "y", position);
|
|
49299
49342
|
const updateHandlerText = handler.name === SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
|
|
49300
49343
|
if (updateHandlerText) {
|
|
49301
|
-
const
|
|
49302
|
-
|
|
49303
|
-
} = this.attribute;
|
|
49304
|
-
updateHandlerText.setAttributes({
|
|
49305
|
-
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
|
|
49306
|
-
[isHorizontal ? "x" : "y"]: position
|
|
49307
|
-
});
|
|
49344
|
+
const handlerPosition = this._getHandlerPosition(handler.name === SLIDER_ELEMENT_NAME.startHandler);
|
|
49345
|
+
updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49308
49346
|
}
|
|
49309
49347
|
handler.name === SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
|
|
49310
49348
|
}
|
|
49311
49349
|
_updateHandlerText(handlerText, position, value) {
|
|
49312
|
-
var _a;
|
|
49313
49350
|
const isHorizontal = this._isHorizontal,
|
|
49314
|
-
|
|
49315
|
-
|
|
49316
|
-
} = this.attribute;
|
|
49317
|
-
handlerText.setAttributes({
|
|
49318
|
-
[isHorizontal ? "x" : "y"]: position,
|
|
49319
|
-
text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
|
|
49320
|
-
});
|
|
49351
|
+
handlerPosition = this._getHandlerPosition(handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText);
|
|
49352
|
+
handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49321
49353
|
const updateHandler = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
|
|
49322
49354
|
updateHandler && updateHandler.setAttributes({
|
|
49323
49355
|
[isHorizontal ? "x" : "y"]: position
|
|
@@ -53093,7 +53125,7 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
53093
53125
|
select: !0
|
|
53094
53126
|
};
|
|
53095
53127
|
|
|
53096
|
-
const version = "1.0.
|
|
53128
|
+
const version = "1.0.42";
|
|
53097
53129
|
preLoadAllModule();
|
|
53098
53130
|
if (isBrowserEnv()) {
|
|
53099
53131
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -16033,9 +16033,10 @@
|
|
|
16033
16033
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
16034
16034
|
} else {
|
|
16035
16035
|
const {
|
|
16036
|
-
backgroundCornerRadius: backgroundCornerRadius
|
|
16036
|
+
backgroundCornerRadius: backgroundCornerRadius,
|
|
16037
|
+
backgroundOpacity = 1
|
|
16037
16038
|
} = graphic.attribute;
|
|
16038
|
-
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();
|
|
16039
16040
|
}
|
|
16040
16041
|
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
16041
16042
|
}
|
|
@@ -43562,8 +43563,9 @@
|
|
|
43562
43563
|
const label = labels[i];
|
|
43563
43564
|
if (!label) continue;
|
|
43564
43565
|
const baseMark = this.getRelatedGraphic(label.attribute);
|
|
43565
|
-
let backgroundColor = baseMark.getAttributes(!0).fill
|
|
43566
|
-
|
|
43566
|
+
let backgroundColor = baseMark.getAttributes(!0).fill;
|
|
43567
|
+
const backgroundOpacity = baseMark.getAttributes(!0).fillOpacity;
|
|
43568
|
+
let foregroundColor = label.attribute.fill;
|
|
43567
43569
|
if (isObject$1(backgroundColor) && backgroundColor.gradient) {
|
|
43568
43570
|
const firstStopColor = null === (_g = null === (_f = backgroundColor.stops) || void 0 === _f ? void 0 : _f[0]) || void 0 === _g ? void 0 : _g.color;
|
|
43569
43571
|
firstStopColor && (backgroundColor = firstStopColor, foregroundColor = firstStopColor);
|
|
@@ -43577,11 +43579,26 @@
|
|
|
43577
43579
|
if (fill && label.setAttributes({
|
|
43578
43580
|
fill: fill
|
|
43579
43581
|
}), 0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43580
|
-
|
|
43581
|
-
|
|
43582
|
-
|
|
43583
|
-
|
|
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
|
+
}
|
|
43584
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
|
+
}
|
|
43585
43602
|
if (0 === label.attribute.lineWidth || 0 === label.attribute.strokeOpacity) continue;
|
|
43586
43603
|
if (label.attribute.stroke) {
|
|
43587
43604
|
label.setAttributes({
|
|
@@ -43598,6 +43615,9 @@
|
|
|
43598
43615
|
stroke: stroke
|
|
43599
43616
|
});
|
|
43600
43617
|
}
|
|
43618
|
+
!1 === isInside && "background" === interactInvertType && label.setAttributes({
|
|
43619
|
+
background: null
|
|
43620
|
+
});
|
|
43601
43621
|
}
|
|
43602
43622
|
}
|
|
43603
43623
|
_canPlaceInside(textBound, shapeBound) {
|
|
@@ -49153,7 +49173,31 @@
|
|
|
49153
49173
|
return graphicCreator.symbol(style);
|
|
49154
49174
|
}
|
|
49155
49175
|
_renderHandlerText(value, position) {
|
|
49156
|
-
|
|
49176
|
+
return graphicCreator.text(this._getHandlerTextAttributes(value, position));
|
|
49177
|
+
}
|
|
49178
|
+
_getHandlerPosition(isStart) {
|
|
49179
|
+
return this.attribute.range && isStart ? "start" : "end";
|
|
49180
|
+
}
|
|
49181
|
+
_getHandlerTextStyle(value, position) {
|
|
49182
|
+
const {
|
|
49183
|
+
align: align,
|
|
49184
|
+
handlerSize = 14,
|
|
49185
|
+
handlerText = {},
|
|
49186
|
+
railHeight: railHeight,
|
|
49187
|
+
railWidth: railWidth,
|
|
49188
|
+
slidable: slidable
|
|
49189
|
+
} = this.attribute;
|
|
49190
|
+
return isFunction$1(handlerText.style) ? handlerText.style(value, position, {
|
|
49191
|
+
layout: this.attribute.layout,
|
|
49192
|
+
align: align,
|
|
49193
|
+
railWidth: railWidth,
|
|
49194
|
+
railHeight: railHeight,
|
|
49195
|
+
handlerSize: handlerSize,
|
|
49196
|
+
slidable: slidable
|
|
49197
|
+
}) : handlerText.style;
|
|
49198
|
+
}
|
|
49199
|
+
_getHandlerTextAttributes(value, position) {
|
|
49200
|
+
var _a, _b;
|
|
49157
49201
|
const {
|
|
49158
49202
|
align: align,
|
|
49159
49203
|
handlerSize = 14,
|
|
@@ -49165,13 +49209,13 @@
|
|
|
49165
49209
|
isHorizontal = this._isHorizontal,
|
|
49166
49210
|
pos = this.calculatePosByValue(value, position),
|
|
49167
49211
|
textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
|
|
49212
|
+
handlerTextStyle = this._getHandlerTextStyle(value, position),
|
|
49168
49213
|
textStyle = {
|
|
49169
49214
|
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
|
|
49170
|
-
lineHeight: null
|
|
49215
|
+
lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
|
|
49171
49216
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
49172
49217
|
};
|
|
49173
|
-
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);
|
|
49174
|
-
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
49218
|
+
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);
|
|
49175
49219
|
}
|
|
49176
49220
|
_renderTooltip() {
|
|
49177
49221
|
var _a;
|
|
@@ -49299,31 +49343,19 @@
|
|
|
49299
49343
|
}
|
|
49300
49344
|
}
|
|
49301
49345
|
_updateHandler(handler, position, value) {
|
|
49302
|
-
var _a;
|
|
49303
49346
|
const isHorizontal = this._isHorizontal;
|
|
49304
49347
|
handler.setAttribute(isHorizontal ? "x" : "y", position);
|
|
49305
49348
|
const updateHandlerText = handler.name === exports.SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
|
|
49306
49349
|
if (updateHandlerText) {
|
|
49307
|
-
const
|
|
49308
|
-
|
|
49309
|
-
} = this.attribute;
|
|
49310
|
-
updateHandlerText.setAttributes({
|
|
49311
|
-
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
|
|
49312
|
-
[isHorizontal ? "x" : "y"]: position
|
|
49313
|
-
});
|
|
49350
|
+
const handlerPosition = this._getHandlerPosition(handler.name === exports.SLIDER_ELEMENT_NAME.startHandler);
|
|
49351
|
+
updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49314
49352
|
}
|
|
49315
49353
|
handler.name === exports.SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
|
|
49316
49354
|
}
|
|
49317
49355
|
_updateHandlerText(handlerText, position, value) {
|
|
49318
|
-
var _a;
|
|
49319
49356
|
const isHorizontal = this._isHorizontal,
|
|
49320
|
-
|
|
49321
|
-
|
|
49322
|
-
} = this.attribute;
|
|
49323
|
-
handlerText.setAttributes({
|
|
49324
|
-
[isHorizontal ? "x" : "y"]: position,
|
|
49325
|
-
text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
|
|
49326
|
-
});
|
|
49357
|
+
handlerPosition = this._getHandlerPosition(handlerText.name === exports.SLIDER_ELEMENT_NAME.startHandlerText);
|
|
49358
|
+
handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
49327
49359
|
const updateHandler = handlerText.name === exports.SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
|
|
49328
49360
|
updateHandler && updateHandler.setAttributes({
|
|
49329
49361
|
[isHorizontal ? "x" : "y"]: position
|
|
@@ -53099,7 +53131,7 @@
|
|
|
53099
53131
|
select: !0
|
|
53100
53132
|
};
|
|
53101
53133
|
|
|
53102
|
-
const version = "1.0.
|
|
53134
|
+
const version = "1.0.42";
|
|
53103
53135
|
preLoadAllModule();
|
|
53104
53136
|
if (isBrowserEnv()) {
|
|
53105
53137
|
loadBrowserEnv(container);
|