Skip to content

Commit

Permalink
Merge pull request #1572 from VisActor/release/0.20.16
Browse files Browse the repository at this point in the history
[Auto release] release 0.20.16
  • Loading branch information
neuqzxy authored Nov 21, 2024
2 parents 130915e + b13eaba commit f331e64
Show file tree
Hide file tree
Showing 68 changed files with 792 additions and 416 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,6 @@ docs/demos/src/node/image.png

# generated documents
docs/public/documents

spec-types
*.tsbuildinfo
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.15","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.20.16","nextBump":"patch"}]
17 changes: 17 additions & 0 deletions docs/assets/changelog/en/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# v0.20.15

2024-11-21


**🆕 New feature**

- **@visactor/vrender-core**: support keepStrokeScale

**🐛 Bug fix**

- **@visactor/vrender-kits**: fix press in andiord



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

# v0.20.14

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

2024-11-21


**🆕 新增功能**

- **@visactor/vrender-core**: support keepStrokeScale

**🐛 功能修复**

- **@visactor/vrender-kits**: fix press in andiord



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

# v0.20.14

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.15",
"@visactor/vrender": "workspace:0.20.16",
"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.16",
"tag": "@visactor/react-vrender-utils_v0.20.16",
"date": "Thu, 21 Nov 2024 06:58:23 GMT",
"comments": {}
},
{
"version": "0.20.15",
"tag": "@visactor/react-vrender-utils_v0.20.15",
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 Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.
This log was last generated on Thu, 21 Nov 2024 06:58:23 GMT and should not be manually modified.

## 0.20.16
Thu, 21 Nov 2024 06:58:23 GMT

_Version update only_

## 0.20.15
Fri, 15 Nov 2024 08:34:34 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.15",
"version": "0.20.16",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.20.15",
"@visactor/react-vrender": "workspace:0.20.15",
"@visactor/vrender": "workspace:0.20.16",
"@visactor/react-vrender": "workspace:0.20.16",
"@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.16",
"tag": "@visactor/react-vrender_v0.20.16",
"date": "Thu, 21 Nov 2024 06:58:23 GMT",
"comments": {}
},
{
"version": "0.20.15",
"tag": "@visactor/react-vrender_v0.20.15",
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 Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.
This log was last generated on Thu, 21 Nov 2024 06:58:23 GMT and should not be manually modified.

## 0.20.16
Thu, 21 Nov 2024 06:58:23 GMT

_Version update only_

## 0.20.15
Fri, 15 Nov 2024 08:34:34 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.15",
"version": "0.20.16",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.20.15",
"@visactor/vrender": "workspace:0.20.16",
"@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.16",
"tag": "@visactor/vrender-components_v0.20.16",
"date": "Thu, 21 Nov 2024 06:58:23 GMT",
"comments": {}
},
{
"version": "0.20.15",
"tag": "@visactor/vrender-components_v0.20.15",
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 Fri, 15 Nov 2024 08:34:34 GMT and should not be manually modified.
This log was last generated on Thu, 21 Nov 2024 06:58:23 GMT and should not be manually modified.

## 0.20.16
Thu, 21 Nov 2024 06:58:23 GMT

_Version update only_

## 0.20.15
Fri, 15 Nov 2024 08:34:34 GMT
Expand Down
9 changes: 5 additions & 4 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.15",
"version": "0.20.16",
"description": "components library for dp visualization",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -21,13 +21,14 @@
"test-cov": "jest --coverage",
"test-live": "npm run test-watch __tests__/unit/",
"test-watch": "cross-env DEBUG_MODE=1 jest --watch",
"analysis-core": "cross-env DEBUG='Bundler*' bundle -f umd -a -i core.ts"
"analysis-core": "cross-env DEBUG='Bundler*' bundle -f umd -a -i core.ts",
"build:spec-types": "rm -rf ./spec-types && tsc -p ./tsconfig.spec.json --declaration --emitDeclarationOnly --outDir ./spec-types"
},
"dependencies": {
"@visactor/vutils": "~0.18.18",
"@visactor/vscale": "~0.18.18",
"@visactor/vrender-core": "workspace:0.20.15",
"@visactor/vrender-kits": "workspace:0.20.15"
"@visactor/vrender-core": "workspace:0.20.16",
"@visactor/vrender-kits": "workspace:0.20.16"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
5 changes: 2 additions & 3 deletions packages/vrender-components/src/axis/type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {
ILineGraphicAttribute,
SymbolType,
ITextGraphicAttribute,
ISymbolGraphicAttribute,
IRectGraphicAttribute,
Expand All @@ -12,8 +11,8 @@ import type {
import type { Dict } from '@visactor/vutils';
import type { ContinuousScale, CustomTicksFunc } from '@visactor/vscale';
import type { Point, TextContent } from '../core/type';
import type { SegmentAttributes } from '../segment';
import type { TagAttributes } from '../tag';
import type { SegmentAttributes } from '../segment/type';
import type { TagAttributes } from '../tag/type';

export type AxisItemStateStyle<T> = {
hover?: T;
Expand Down
2 changes: 1 addition & 1 deletion packages/vrender-components/src/data-zoom/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '@visactor/vrender-core';
import type { IPointLike } from '@visactor/vutils';
import type { IDelayType, OrientType } from '../interface';
import type { TagAttributes } from '../tag';
import type { TagAttributes } from '../tag/type';

export enum DataZoomActiveTag {
startHandler = 'startHandler',
Expand Down
10 changes: 1 addition & 9 deletions packages/vrender-components/src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import type {
ICustomPath2D,
IGraphicAttribute,
IGroup,
IRectGraphicAttribute,
IRichText,
IText
} from '@visactor/vrender-core';
import type { TextContent } from './core/type';
import type { ICustomPath2D, IGraphicAttribute, IGroup, IRectGraphicAttribute } from '@visactor/vrender-core';

export type Direction = 'horizontal' | 'vertical';

Expand Down
20 changes: 15 additions & 5 deletions packages/vrender-components/src/label/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,19 +527,30 @@ export class LabelBase<T extends BaseLabelAttrs> extends AbstractComponent<T> {
if (clampForce) {
for (let i = 0; i < result.length; i++) {
const text = labels[i];
const { dx = 0, dy = 0 } = clampText(text as IText, bmpTool.width, bmpTool.height);
const { dx = 0, dy = 0 } = clampText(text as IText, bmpTool.width, bmpTool.height, bmpTool.padding);
if (dx !== 0 || dy !== 0) {
text.setAttributes({ x: text.attribute.x + dx, y: text.attribute.y + dy });
text._isClamped = true;
}
}
}
result = shiftY(result as any, { maxY: bmpTool.height, ...(strategy as ShiftYStrategy) });
result = shiftY(result as any, {
maxY: bmpTool.height,
...(strategy as ShiftYStrategy),
labelling: (text: IText) => {
const baseMark = this.getRelatedGraphic(text.attribute);
const graphicBound = this._isCollectionBase
? this.getGraphicBounds(null, this._idToPoint.get((text.attribute as any).id))
: this.getGraphicBounds(baseMark, text);
return this.labeling(text.AABBBounds, graphicBound, 'bottom', this.attribute.offset);
}
});

for (let i = 0; i < result.length; i++) {
const text = result[i];
const bounds = text.AABBBounds;
const range = boundToRange(bmpTool, bounds, true);
if (canPlace(bmpTool, bitmap, bounds, clampForce, overlapPadding)) {
if (canPlace(bmpTool, bitmap, bounds, clampForce, text._isClamped ? 0 : overlapPadding)) {
bitmap.setRange(range);
} else {
if (hideOnHit) {
Expand All @@ -549,7 +560,6 @@ export class LabelBase<T extends BaseLabelAttrs> extends AbstractComponent<T> {
}
}
}

return result;
}

Expand Down Expand Up @@ -646,7 +656,7 @@ export class LabelBase<T extends BaseLabelAttrs> extends AbstractComponent<T> {
// 尝试向内挤压
if (!hasPlace && clampForce) {
// 向内挤压不考虑 overlapPadding
const { dx = 0, dy = 0 } = clampText(text as IText, bmpTool.width, bmpTool.height);
const { dx = 0, dy = 0 } = clampText(text as IText, bmpTool.width, bmpTool.height, bmpTool.padding);
if (dx === 0 && dy === 0) {
if (canPlace(bmpTool, bitmap, text.AABBBounds)) {
// xy方向偏移都为0,意味着不考虑 overlapPadding 时,实际上可以放得下
Expand Down
Loading

0 comments on commit f331e64

Please sign in to comment.