Skip to content

Commit

Permalink
Merge pull request #1558 from VisActor/release/0.20.15
Browse files Browse the repository at this point in the history
[Auto release] release 0.20.15
  • Loading branch information
xile611 authored Nov 18, 2024
2 parents c202905 + a31fb3c commit 130915e
Show file tree
Hide file tree
Showing 42 changed files with 202 additions and 62 deletions.
26 changes: 13 additions & 13 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.20.14","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.20.15","nextBump":"patch"}]
13 changes: 13 additions & 0 deletions docs/assets/changelog/en/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# v0.20.14

2024-11-13


**What's Changed**

* fix: incorrect default hover trigger of discrete legend by @xiaoluoHe in https://github.com/VisActor/VRender/pull/1550

**Full Changelog**: https://github.com/VisActor/VRender/compare/v0.20.13...v0.20.14

[more detail about v0.20.14](https://github.com/VisActor/VRender/releases/tag/v0.20.14)

# v0.20.13

2024-11-13
Expand Down
13 changes: 13 additions & 0 deletions docs/assets/changelog/zh/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# v0.20.14

2024-11-13


**What's Changed**

* fix: incorrect default hover trigger of discrete legend by @xiaoluoHe in https://github.com/VisActor/VRender/pull/1550

**Full Changelog**: https://github.com/VisActor/VRender/compare/v0.20.13...v0.20.14

[更多详情请查看 v0.20.14](https://github.com/VisActor/VRender/releases/tag/v0.20.14)

# v0.20.13

2024-11-13
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@visactor/vchart": "1.3.0",
"@visactor/vutils": "~0.18.18",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:0.20.14",
"@visactor/vrender": "workspace:0.20.15",
"markdown-it": "^13.0.0",
"highlight.js": "^11.8.0",
"axios": "^1.4.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender-utils/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender-utils",
"entries": [
{
"version": "0.20.15",
"tag": "@visactor/react-vrender-utils_v0.20.15",
"date": "Fri, 15 Nov 2024 08:34:34 GMT",
"comments": {}
},
{
"version": "0.20.14",
"tag": "@visactor/react-vrender-utils_v0.20.14",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender-utils

This log was last generated on Wed, 13 Nov 2024 07:47:15 GMT and should not be manually modified.
This log was last generated on Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.

## 0.20.15
Fri, 15 Nov 2024 08:34:34 GMT

_Version update only_

## 0.20.14
Wed, 13 Nov 2024 07:47:15 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/react-vrender-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender-utils",
"version": "0.20.14",
"version": "0.20.15",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.20.14",
"@visactor/react-vrender": "workspace:0.20.14",
"@visactor/vrender": "workspace:0.20.15",
"@visactor/react-vrender": "workspace:0.20.15",
"@visactor/vutils": "~0.18.18",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender",
"entries": [
{
"version": "0.20.15",
"tag": "@visactor/react-vrender_v0.20.15",
"date": "Fri, 15 Nov 2024 08:34:34 GMT",
"comments": {}
},
{
"version": "0.20.14",
"tag": "@visactor/react-vrender_v0.20.14",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender

This log was last generated on Wed, 13 Nov 2024 07:47:15 GMT and should not be manually modified.
This log was last generated on Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.

## 0.20.15
Fri, 15 Nov 2024 08:34:34 GMT

_Version update only_

## 0.20.14
Wed, 13 Nov 2024 07:47:15 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/react-vrender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender",
"version": "0.20.14",
"version": "0.20.15",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.20.14",
"@visactor/vrender": "workspace:0.20.15",
"@visactor/vutils": "~0.18.18",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/vrender-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/vrender-components",
"entries": [
{
"version": "0.20.15",
"tag": "@visactor/vrender-components_v0.20.15",
"date": "Fri, 15 Nov 2024 08:34:34 GMT",
"comments": {}
},
{
"version": "0.20.14",
"tag": "@visactor/vrender-components_v0.20.14",
Expand Down
7 changes: 6 additions & 1 deletion packages/vrender-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/vrender-components

This log was last generated on Wed, 13 Nov 2024 07:47:16 GMT and should not be manually modified.
This log was last generated on Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.

## 0.20.15
Fri, 15 Nov 2024 08:34:34 GMT

_Version update only_

## 0.20.14
Wed, 13 Nov 2024 07:47:16 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/vrender-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vrender-components",
"version": "0.20.14",
"version": "0.20.15",
"description": "components library for dp visualization",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -26,8 +26,8 @@
"dependencies": {
"@visactor/vutils": "~0.18.18",
"@visactor/vscale": "~0.18.18",
"@visactor/vrender-core": "workspace:0.20.14",
"@visactor/vrender-kits": "workspace:0.20.14"
"@visactor/vrender-core": "workspace:0.20.15",
"@visactor/vrender-kits": "workspace:0.20.15"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
12 changes: 12 additions & 0 deletions packages/vrender-core/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@visactor/vrender-core",
"entries": [
{
"version": "0.20.15",
"tag": "@visactor/vrender-core_v0.20.15",
"date": "Fri, 15 Nov 2024 08:34:34 GMT",
"comments": {
"none": [
{
"comment": "feat: support keepStrokeScale"
}
]
}
},
{
"version": "0.20.14",
"tag": "@visactor/vrender-core_v0.20.14",
Expand Down
9 changes: 8 additions & 1 deletion packages/vrender-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @visactor/vrender-core

This log was last generated on Wed, 13 Nov 2024 07:47:16 GMT and should not be manually modified.
This log was last generated on Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.

## 0.20.15
Fri, 15 Nov 2024 08:34:34 GMT

### Updates

- feat: support keepStrokeScale

## 0.20.14
Wed, 13 Nov 2024 07:47:16 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/vrender-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vrender-core",
"version": "0.20.14",
"version": "0.20.15",
"description": "",
"sideEffects": [
"./src/modules.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/vrender-core/src/graphic/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export const DefaultAttribute: Required<IGraphicAttribute> = {
globalCompositeOperation: '',
overflow: 'hidden',
shadowPickMode: 'graphic',
keepStrokeScale: false,
...DefaultDebugAttribute,
...DefaultStyle,
...DefaultTransform
Expand Down
1 change: 1 addition & 0 deletions packages/vrender-core/src/interface/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export interface IStrokeStyleParams {
lineJoin?: CanvasLineJoin;
miterLimit?: number;
opacity?: number;
keepStrokeScale?: boolean;
}
export interface ITextStyleParams {
font?: string;
Expand Down
3 changes: 3 additions & 0 deletions packages/vrender-core/src/interface/graphic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ export type IGraphicAttribute = IDebugType &
overflow: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';
// 绘制fill和stroke的顺序,为0表示fill先绘制,1表示stroke先绘制
fillStrokeOrder: number;
// @since 0.20.15
// 保持stroke的scale,默认为false,为true的话stroke显示的宽度会随着scale变化
keepStrokeScale: boolean;
};

export interface IGraphicJson<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class DefaultArcRenderContribution implements IArcRenderContribution {
x: originX = arcAttribute.x,
y: originY = arcAttribute.y,
scaleX = arcAttribute.scaleX,
scaleY = arcAttribute.scaleY
scaleY = arcAttribute.scaleY,
keepStrokeScale = arcAttribute.keepStrokeScale
} = arc.attribute;
let { innerRadius = arcAttribute.innerRadius, outerRadius = arcAttribute.outerRadius } = arc.attribute;
outerRadius += outerPadding;
Expand All @@ -66,7 +67,7 @@ export class DefaultArcRenderContribution implements IArcRenderContribution {
const doStroke = !!(borderStyle && borderStyle.stroke);

const { distance = arcAttribute[key].distance } = borderStyle;
const d = getScaledStroke(context, distance as number, context.dpr);
const d = keepStrokeScale ? (distance as number) : getScaledStroke(context, distance as number, context.dpr);
const deltaAngle = (distance as number) / outerRadius;
const sign = key === 'outerBorder' ? 1 : -1;
arc.setAttributes({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ export class DefaultCircleRenderContribution implements ICircleRenderContributio
x: originX = circleAttribute.x,
y: originY = circleAttribute.y,
scaleX = circleAttribute.scaleX,
scaleY = circleAttribute.scaleY
scaleY = circleAttribute.scaleY,
keepStrokeScale = circleAttribute.keepStrokeScale
} = circle.attribute;

const renderBorder = (borderStyle: Partial<IBorderStyle>, key: 'outerBorder' | 'innerBorder') => {
const doStroke = !!(borderStyle && borderStyle.stroke);

const { distance = circleAttribute[key].distance } = borderStyle;
const d = getScaledStroke(context, distance as number, context.dpr);
const d = keepStrokeScale ? (distance as number) : getScaledStroke(context, distance as number, context.dpr);
const sign = key === 'outerBorder' ? 1 : -1;
context.beginPath();
context.arc(x, y, radius + sign * d, startAngle, endAngle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export class DefaultRectRenderContribution implements IRectRenderContribution {
scaleX = rectAttribute.scaleX,
scaleY = rectAttribute.scaleY,
x1,
y1
y1,
keepStrokeScale = rectAttribute.keepStrokeScale
} = rect.attribute;

let { width, height } = rect.attribute;
Expand All @@ -70,7 +71,7 @@ export class DefaultRectRenderContribution implements IRectRenderContribution {

const sign = key === 'outerBorder' ? -1 : 1;
const { distance = rectAttribute[key].distance } = borderStyle;
const d = getScaledStroke(context, distance as number, context.dpr);
const d = keepStrokeScale ? (distance as number) : getScaledStroke(context, distance as number, context.dpr);
const nextX = x + sign * d;
const nextY = y + sign * d;
const dw = d * 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ export class DefaultSymbolRenderContribution implements ISymbolRenderContributio
x: originX = symbolAttribute.x,
y: originY = symbolAttribute.y,
scaleX = symbolAttribute.scaleX,
scaleY = symbolAttribute.scaleY
scaleY = symbolAttribute.scaleY,
keepStrokeScale = symbolAttribute.keepStrokeScale
} = symbol.attribute;

const renderBorder = (borderStyle: Partial<IBorderStyle>, key: 'outerBorder' | 'innerBorder') => {
const doStroke = !!(borderStyle && borderStyle.stroke);

const { distance = symbolAttribute[key].distance } = borderStyle;
const d = getScaledStroke(context, distance as number, context.dpr);
const d = keepStrokeScale ? (distance as number) : getScaledStroke(context, distance as number, context.dpr);
const sign = key === 'outerBorder' ? 1 : -1;

context.beginPath();
Expand Down
Loading

0 comments on commit 130915e

Please sign in to comment.