Skip to content

Commit

Permalink
Merge pull request #1763 from VisActor/release/0.22.4
Browse files Browse the repository at this point in the history
[Auto release] release 0.22.4
  • Loading branch information
neuqzxy authored Feb 27, 2025
2 parents 0595859 + 1dd2386 commit fd42ef6
Show file tree
Hide file tree
Showing 27 changed files with 614 additions and 87 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.22.3","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.22.4","nextBump":"patch"}]
14 changes: 14 additions & 0 deletions docs/assets/changelog/en/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# v0.22.3

2025-02-27


**🐛 Bug fix**

- **@visactor/vrender-kits**: roam zoom not work in mobile browser
- **@visactor/vrender-core**: fix issue with text edit include textAlign and bounds



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

# v0.22.2

2025-02-24
Expand Down
14 changes: 14 additions & 0 deletions docs/assets/changelog/zh/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# v0.22.3

2025-02-27


**🐛 功能修复**

- **@visactor/vrender-kits**: roam zoom not work in mobile browser
- **@visactor/vrender-core**: fix issue with text edit include textAlign and bounds



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

# v0.22.2

2025-02-24
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.19.4",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:0.22.3",
"@visactor/vrender": "workspace:0.22.4",
"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.22.4",
"tag": "@visactor/react-vrender-utils_v0.22.4",
"date": "Thu, 27 Feb 2025 08:34:05 GMT",
"comments": {}
},
{
"version": "0.22.3",
"tag": "@visactor/react-vrender-utils_v0.22.3",
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, 26 Feb 2025 07:36:06 GMT and should not be manually modified.
This log was last generated on Thu, 27 Feb 2025 08:34:05 GMT and should not be manually modified.

## 0.22.4
Thu, 27 Feb 2025 08:34:05 GMT

_Version update only_

## 0.22.3
Wed, 26 Feb 2025 07:36:06 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.22.3",
"version": "0.22.4",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.22.3",
"@visactor/react-vrender": "workspace:0.22.3",
"@visactor/vrender": "workspace:0.22.4",
"@visactor/react-vrender": "workspace:0.22.4",
"@visactor/vutils": "~0.19.4",
"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.22.4",
"tag": "@visactor/react-vrender_v0.22.4",
"date": "Thu, 27 Feb 2025 08:34:05 GMT",
"comments": {}
},
{
"version": "0.22.3",
"tag": "@visactor/react-vrender_v0.22.3",
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, 26 Feb 2025 07:36:06 GMT and should not be manually modified.
This log was last generated on Thu, 27 Feb 2025 08:34:05 GMT and should not be manually modified.

## 0.22.4
Thu, 27 Feb 2025 08:34:05 GMT

_Version update only_

## 0.22.3
Wed, 26 Feb 2025 07:36:06 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.22.3",
"version": "0.22.4",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.22.3",
"@visactor/vrender": "workspace:0.22.4",
"@visactor/vutils": "~0.19.4",
"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.22.4",
"tag": "@visactor/vrender-components_v0.22.4",
"date": "Thu, 27 Feb 2025 08:34:05 GMT",
"comments": {}
},
{
"version": "0.22.3",
"tag": "@visactor/vrender-components_v0.22.3",
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, 26 Feb 2025 07:36:06 GMT and should not be manually modified.
This log was last generated on Thu, 27 Feb 2025 08:34:05 GMT and should not be manually modified.

## 0.22.4
Thu, 27 Feb 2025 08:34:05 GMT

_Version update only_

## 0.22.3
Wed, 26 Feb 2025 07:36:06 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.22.3",
"version": "0.22.4",
"description": "components library for dp visualization",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -27,8 +27,8 @@
"dependencies": {
"@visactor/vutils": "~0.19.4",
"@visactor/vscale": "~0.19.4",
"@visactor/vrender-core": "workspace:0.22.3",
"@visactor/vrender-kits": "workspace:0.22.3"
"@visactor/vrender-core": "workspace:0.22.4",
"@visactor/vrender-kits": "workspace:0.22.4"
},
"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.22.4",
"tag": "@visactor/vrender-core_v0.22.4",
"date": "Thu, 27 Feb 2025 08:34:05 GMT",
"comments": {
"none": [
{
"comment": "fix: fix pos issue with dynamic texture, optmize performance for dynamic texture"
}
]
}
},
{
"version": "0.22.3",
"tag": "@visactor/vrender-core_v0.22.3",
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, 26 Feb 2025 07:36:06 GMT and should not be manually modified.
This log was last generated on Thu, 27 Feb 2025 08:34:05 GMT and should not be manually modified.

## 0.22.4
Thu, 27 Feb 2025 08:34:05 GMT

### Updates

- fix: fix pos issue with dynamic texture, optmize performance for dynamic texture

## 0.22.3
Wed, 26 Feb 2025 07:36:06 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.22.3",
"version": "0.22.4",
"description": "",
"sideEffects": [
"./src/modules.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { BaseRenderContributionTime } from '../../../../common/enums';
import { createSymbol } from '../../../../graphic';
import type {
IBaseRenderContribution,
ICanvas,
IContext2d,
IDrawContext,
IGraphic,
Expand Down Expand Up @@ -279,11 +280,31 @@ export class DefaultBaseTextureRenderContribution implements IBaseRenderContribu

if (textureOptions && textureOptions.dynamicTexture) {
// 动态纹理
context.save();
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
context.clip();
const { gridConfig = {} } = textureOptions;
const { gridConfig = {}, useNewCanvas } = textureOptions;
const b = graphic.AABBBounds;
x = b.x1;
y = b.y1;
const originalContext = context;

let newCanvas: ICanvas;
if (useNewCanvas) {
newCanvas = canvasAllocate.allocate({ width: b.width(), height: b.height(), dpr: context.dpr });
const ctx = newCanvas.getContext('2d');
ctx.clearRect(0, 0, b.width(), b.height());
x = 0;
y = 0;
context = ctx;
}
originalContext.save();
// 避免本级已经transform过了,再用Bounds就重复了
if (graphic.parent && !graphic.transMatrix.onlyTranslate()) {
const { scrollX = 0, scrollY = 0 } = graphic.parent.attribute;
originalContext.setTransformFromMatrix(graphic.parent.globalTransMatrix);
originalContext.translate(scrollX, scrollY, true);
}
originalContext.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
originalContext.clip();

const width = b.width();
const height = b.height();
const padding = texturePadding;
Expand All @@ -306,16 +327,52 @@ export class DefaultBaseTextureRenderContribution implements IBaseRenderContribu
for (let j = 0; j < gridColumns; j++) {
const _x = x + cellSize / 2 + j * cellSize;
const _y = y + cellSize / 2 + i * cellSize;
textureOptions.beforeDynamicTexture?.(
context,
i,
j,
gridRows,
gridColumns,
textureRatio,
graphic,
b.width(),
b.height()
);
context.beginPath();
if (parsedPath.draw(context, Math.min(sizeW - gutterColumn, sizeH - gutterRow), _x, _y, 0) === false) {
context.closePath();
}
context.fillStyle = textureColor;
textureOptions.dynamicTexture(context, i, j, gridRows, gridColumns, textureRatio, graphic);
textureOptions.dynamicTexture(
context,
i,
j,
gridRows,
gridColumns,
textureRatio,
graphic,
b.width(),
b.height()
);
}
}
if (useNewCanvas) {
// 不使用外部的opacity,动态纹理的opacity自己设置
originalContext.globalAlpha = 1;
originalContext.drawImage(
newCanvas.nativeCanvas,
0,
0,
newCanvas.nativeCanvas.width,
newCanvas.nativeCanvas.height,
b.x1,
b.y1,
b.width() * originalContext.dpr,
b.height() * originalContext.dpr
);
}

context.restore();
originalContext.restore();
} else if (pattern) {
context.highPerformanceSave();
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute);
Expand Down
Loading

0 comments on commit fd42ef6

Please sign in to comment.