@visactor/vrender-components 0.20.13 → 0.20.15
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/brush/brush.js +2 -1
- package/cjs/brush/type.js +1 -2
- package/cjs/core/base.js +2 -1
- package/cjs/data-zoom/config.js +1 -2
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/legend/discrete/discrete.js +1 -1
- package/cjs/legend/discrete/discrete.js.map +1 -1
- package/dist/index.es.js +28 -19
- package/es/brush/brush.js +2 -1
- package/es/brush/type.js +1 -2
- package/es/core/base.js +2 -1
- package/es/data-zoom/config.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/legend/discrete/discrete.js +1 -1
- package/es/legend/discrete/discrete.js.map +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -2086,7 +2086,8 @@ const DefaultAttribute = Object.assign(Object.assign(Object.assign({
|
|
|
2086
2086
|
globalZIndex: 1,
|
|
2087
2087
|
globalCompositeOperation: "",
|
|
2088
2088
|
overflow: "hidden",
|
|
2089
|
-
shadowPickMode: "graphic"
|
|
2089
|
+
shadowPickMode: "graphic",
|
|
2090
|
+
keepStrokeScale: !1
|
|
2090
2091
|
}, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
|
|
2091
2092
|
const DefaultArcAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
2092
2093
|
startAngle: 0,
|
|
@@ -7024,7 +7025,8 @@ class DefaultArcRenderContribution {
|
|
|
7024
7025
|
x: originX = arcAttribute.x,
|
|
7025
7026
|
y: originY = arcAttribute.y,
|
|
7026
7027
|
scaleX = arcAttribute.scaleX,
|
|
7027
|
-
scaleY = arcAttribute.scaleY
|
|
7028
|
+
scaleY = arcAttribute.scaleY,
|
|
7029
|
+
keepStrokeScale = arcAttribute.keepStrokeScale
|
|
7028
7030
|
} = arc.attribute;
|
|
7029
7031
|
let {
|
|
7030
7032
|
innerRadius = arcAttribute.innerRadius,
|
|
@@ -7036,7 +7038,7 @@ class DefaultArcRenderContribution {
|
|
|
7036
7038
|
{
|
|
7037
7039
|
distance = arcAttribute[key].distance
|
|
7038
7040
|
} = borderStyle,
|
|
7039
|
-
d = getScaledStroke(context, distance, context.dpr),
|
|
7041
|
+
d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
|
|
7040
7042
|
deltaAngle = distance / outerRadius,
|
|
7041
7043
|
sign = "outerBorder" === key ? 1 : -1;
|
|
7042
7044
|
if (arc.setAttributes({
|
|
@@ -7081,14 +7083,15 @@ class DefaultCircleRenderContribution {
|
|
|
7081
7083
|
x: originX = circleAttribute.x,
|
|
7082
7084
|
y: originY = circleAttribute.y,
|
|
7083
7085
|
scaleX = circleAttribute.scaleX,
|
|
7084
|
-
scaleY = circleAttribute.scaleY
|
|
7086
|
+
scaleY = circleAttribute.scaleY,
|
|
7087
|
+
keepStrokeScale = circleAttribute.keepStrokeScale
|
|
7085
7088
|
} = circle.attribute,
|
|
7086
7089
|
renderBorder = (borderStyle, key) => {
|
|
7087
7090
|
const doStroke = !(!borderStyle || !borderStyle.stroke),
|
|
7088
7091
|
{
|
|
7089
7092
|
distance = circleAttribute[key].distance
|
|
7090
7093
|
} = borderStyle,
|
|
7091
|
-
d = getScaledStroke(context, distance, context.dpr),
|
|
7094
|
+
d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
|
|
7092
7095
|
sign = "outerBorder" === key ? 1 : -1;
|
|
7093
7096
|
if (context.beginPath(), context.arc(x, y, radius + sign * d, startAngle, endAngle), context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(circle, circle.attribute, circleAttribute), strokeCb) strokeCb(context, borderStyle, circleAttribute[key]);else if (doStroke) {
|
|
7094
7097
|
const lastOpacity = circleAttribute[key].opacity;
|
|
@@ -7207,7 +7210,8 @@ class DefaultRectRenderContribution {
|
|
|
7207
7210
|
scaleX = rectAttribute.scaleX,
|
|
7208
7211
|
scaleY = rectAttribute.scaleY,
|
|
7209
7212
|
x1: x1,
|
|
7210
|
-
y1: y1
|
|
7213
|
+
y1: y1,
|
|
7214
|
+
keepStrokeScale = rectAttribute.keepStrokeScale
|
|
7211
7215
|
} = rect.attribute;
|
|
7212
7216
|
let {
|
|
7213
7217
|
width: width,
|
|
@@ -7220,7 +7224,7 @@ class DefaultRectRenderContribution {
|
|
|
7220
7224
|
{
|
|
7221
7225
|
distance = rectAttribute[key].distance
|
|
7222
7226
|
} = borderStyle,
|
|
7223
|
-
d = getScaledStroke(context, distance, context.dpr),
|
|
7227
|
+
d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
|
|
7224
7228
|
nextX = x + sign * d,
|
|
7225
7229
|
nextY = y + sign * d,
|
|
7226
7230
|
dw = 2 * d;
|
|
@@ -7377,14 +7381,15 @@ class DefaultSymbolRenderContribution {
|
|
|
7377
7381
|
x: originX = symbolAttribute.x,
|
|
7378
7382
|
y: originY = symbolAttribute.y,
|
|
7379
7383
|
scaleX = symbolAttribute.scaleX,
|
|
7380
|
-
scaleY = symbolAttribute.scaleY
|
|
7384
|
+
scaleY = symbolAttribute.scaleY,
|
|
7385
|
+
keepStrokeScale = symbolAttribute.keepStrokeScale
|
|
7381
7386
|
} = symbol.attribute,
|
|
7382
7387
|
renderBorder = (borderStyle, key) => {
|
|
7383
7388
|
const doStroke = !(!borderStyle || !borderStyle.stroke),
|
|
7384
7389
|
{
|
|
7385
7390
|
distance = symbolAttribute[key].distance
|
|
7386
7391
|
} = borderStyle,
|
|
7387
|
-
d = getScaledStroke(context, distance, context.dpr),
|
|
7392
|
+
d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
|
|
7388
7393
|
sign = "outerBorder" === key ? 1 : -1;
|
|
7389
7394
|
if (context.beginPath(), !1 === parsedPath.drawOffset(context, size, x, y, sign * d) && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), strokeCb) strokeCb(context, borderStyle, symbolAttribute[key]);else if (doStroke) {
|
|
7390
7395
|
const lastOpacity = symbolAttribute[key].opacity;
|
|
@@ -13343,8 +13348,9 @@ class PickerBase {
|
|
|
13343
13348
|
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, arcAttribute, themeAttribute) => {
|
|
13344
13349
|
if (picked) return !0;
|
|
13345
13350
|
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
13346
|
-
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
13347
|
-
|
|
13351
|
+
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
13352
|
+
keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
13353
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
13348
13354
|
}), pickContext.highPerformanceRestore(), picked;
|
|
13349
13355
|
}
|
|
13350
13356
|
}
|
|
@@ -13566,8 +13572,9 @@ class RectPickerBase {
|
|
|
13566
13572
|
if (!onlyTranslate || rect.shadowRoot || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
13567
13573
|
if (picked) return !0;
|
|
13568
13574
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
13569
|
-
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
13570
|
-
|
|
13575
|
+
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
13576
|
+
keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
13577
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
13571
13578
|
});else {
|
|
13572
13579
|
const {
|
|
13573
13580
|
fill = rectAttribute.fill,
|
|
@@ -13746,8 +13753,9 @@ class BaseLinePicker extends BaseRender {
|
|
|
13746
13753
|
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
13747
13754
|
if (picked) return !0;
|
|
13748
13755
|
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
13749
|
-
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
13750
|
-
|
|
13756
|
+
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
13757
|
+
keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
13758
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
13751
13759
|
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
13752
13760
|
}
|
|
13753
13761
|
}
|
|
@@ -13882,8 +13890,9 @@ let DefaultCanvasSymbolPicker = class extends Base3dPicker {
|
|
|
13882
13890
|
return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
|
|
13883
13891
|
if (picked) return !0;
|
|
13884
13892
|
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
13885
|
-
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer
|
|
13886
|
-
|
|
13893
|
+
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
13894
|
+
keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
13895
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
13887
13896
|
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
13888
13897
|
}
|
|
13889
13898
|
};
|
|
@@ -24788,7 +24797,7 @@ class DiscreteLegend extends LegendBase {
|
|
|
24788
24797
|
}
|
|
24789
24798
|
const { hover = true, select = true } = this.attribute;
|
|
24790
24799
|
if (hover) {
|
|
24791
|
-
let trigger = '
|
|
24800
|
+
let trigger = 'pointermove';
|
|
24792
24801
|
let triggerOff = 'pointerleave';
|
|
24793
24802
|
if (isObject(hover)) {
|
|
24794
24803
|
hover.trigger && (trigger = hover.trigger);
|
|
@@ -29546,6 +29555,6 @@ EmptyTip.defaultAttributes = {
|
|
|
29546
29555
|
}
|
|
29547
29556
|
};
|
|
29548
29557
|
|
|
29549
|
-
const version = "0.20.
|
|
29558
|
+
const version = "0.20.15";
|
|
29550
29559
|
|
|
29551
29560
|
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
package/es/brush/brush.js
CHANGED
package/es/brush/type.js
CHANGED
|
@@ -4,5 +4,4 @@ export var IOperateType;
|
|
|
4
4
|
IOperateType.drawStart = "drawStart", IOperateType.drawEnd = "drawEnd", IOperateType.drawing = "drawing",
|
|
5
5
|
IOperateType.moving = "moving", IOperateType.moveStart = "moveStart", IOperateType.moveEnd = "moveEnd",
|
|
6
6
|
IOperateType.brushClear = "brushClear";
|
|
7
|
-
}(IOperateType || (IOperateType = {}));
|
|
8
|
-
//# sourceMappingURL=type.js.map
|
|
7
|
+
}(IOperateType || (IOperateType = {}));
|
package/es/core/base.js
CHANGED
package/es/data-zoom/config.js
CHANGED
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AAEjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.20.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AAEjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.20.15\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
|
|
@@ -166,7 +166,7 @@ export class DiscreteLegend extends LegendBase {
|
|
|
166
166
|
if (!this._itemsContainer) return;
|
|
167
167
|
const {hover: hover = !0, select: select = !0} = this.attribute;
|
|
168
168
|
if (hover) {
|
|
169
|
-
let trigger = "
|
|
169
|
+
let trigger = "pointermove", triggerOff = "pointerleave";
|
|
170
170
|
isObject(hover) && (hover.trigger && (trigger = hover.trigger), hover.triggerOff && (triggerOff = hover.triggerOff)),
|
|
171
171
|
this._itemsContainer.addEventListener(trigger, this._onHover), this._itemsContainer.addEventListener(triggerOff, this._onUnHover);
|
|
172
172
|
}
|