Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/0.14.0 #291

Merged
merged 51 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
19aa940
refactor: rename global and window to vglobal and vwindow, closed #56
neuqzxy Jul 24, 2023
378111c
refactor: rename global to vglobal
neuqzxy Jul 24, 2023
b76976b
Merge branch 'develop' into refactor/global-window-rename
neuqzxy Jul 24, 2023
9d08f00
feat: add basic logic of connect line and area, closed #109
neuqzxy Aug 1, 2023
8ef1f30
feat: support vertical text layout insingle line
neuqzxy Aug 2, 2023
95cf91f
ci: github workflow add dev/** ci
neuqzxy Aug 2, 2023
6025aa9
Merge branch 'dev/0.14.0' into feat/vertical-text
neuqzxy Aug 2, 2023
7b43b97
feat: support multiline vertical text, closed #151
neuqzxy Aug 3, 2023
c3bcc07
Merge pull request #245 from VisActor/feat/vertical-text
neuqzxy Aug 4, 2023
3a93256
Merge pull request #239 from VisActor/feat/connected-line-area
neuqzxy Aug 4, 2023
bcdea52
chore: merge main
neuqzxy Aug 4, 2023
bf05fae
feat: set default and invilid connectType to none, closed #109
neuqzxy Aug 4, 2023
5b0fcac
Merge pull request #259 from VisActor/dev/0.14.0_sync_main
neuqzxy Aug 4, 2023
0e06d4b
feat: label component support avoidMarks
xiaoluoHe Aug 3, 2023
094cb81
Merge pull request #261 from VisActor/feat/default-connected-line-area
neuqzxy Aug 4, 2023
766deee
Merge branch 'dev/0.14.0' of https://github.com/VisActor/VRender into…
xiaoluoHe Aug 4, 2023
42de0d8
Merge pull request #262 from VisActor/feat/label_avoidMarks
xiaoluoHe Aug 4, 2023
7cbf7fb
feat: support flex layout, closed #152
neuqzxy Aug 4, 2023
370f776
chore: update pnpm-lock.yaml
kkxxkk2019 Aug 6, 2023
ec222f4
feat(vrender-components): add `verticalMinSize` and `containerAlign` …
kkxxkk2019 Aug 6, 2023
65ac222
chore: update rush change
kkxxkk2019 Aug 6, 2023
59bb337
chore: add line axis containerAlign demo
kkxxkk2019 Aug 6, 2023
d62362d
Merge pull request #263 from VisActor/feat/layout
neuqzxy Aug 7, 2023
1ebe1a1
feat: support text word-break, closed #235
neuqzxy Aug 7, 2023
b3e4cc8
test: add unit test case for line axis's `containerAlign` and `vertic…
kkxxkk2019 Aug 7, 2023
8b043fb
fix: fix the line axis type
kkxxkk2019 Aug 7, 2023
a51eb52
Merge remote-tracking branch 'origin/dev/0.14.0' into feat/containerA…
kkxxkk2019 Aug 7, 2023
4e39ca5
fix: fix type error
neuqzxy Aug 7, 2023
8c7fe5c
feat: support animate-bind event, closed #264
neuqzxy Aug 7, 2023
fe6ed2c
fix: fix the issue of line connect, closed #109
neuqzxy Aug 7, 2023
69593dd
Merge pull request #267 from VisActor/feat/text-wordBreak
neuqzxy Aug 7, 2023
b9a8d0f
Merge pull request #269 from VisActor/feat/onAnimateBind
neuqzxy Aug 7, 2023
db66374
Merge pull request #271 from VisActor/fix/lineConnect
neuqzxy Aug 7, 2023
158ae7b
fix(vrender-components): the axis label's textAlign and textBaseline …
kkxxkk2019 Aug 7, 2023
554b351
chore: update rush change
kkxxkk2019 Aug 7, 2023
3c29344
fix(vrender-components): panel only works for line axis
kkxxkk2019 Aug 7, 2023
750c0ac
chore: update rush change
kkxxkk2019 Aug 7, 2023
d63c3dd
Merge remote-tracking branch 'origin/dev/0.14.0' into feat/containerA…
kkxxkk2019 Aug 8, 2023
0fc71a4
fix: fix the issue of area connect, closed #274
neuqzxy Aug 8, 2023
2e5d15e
Merge pull request #276 from VisActor/fix/lineConnected
neuqzxy Aug 8, 2023
65e7c0e
chore: merge dev/0.14.0
neuqzxy Aug 8, 2023
3ca52b9
Merge remote-tracking branch 'origin/dev/0.14.0' into feat/containerA…
kkxxkk2019 Aug 8, 2023
4d6071e
Merge remote-tracking branch 'origin/develop' into dev/0.14.0
kkxxkk2019 Aug 8, 2023
ea3633e
Merge remote-tracking branch 'origin/dev/0.14.0' into feat/containerA…
kkxxkk2019 Aug 8, 2023
091c134
fix: line axis states should set default value
kkxxkk2019 Aug 8, 2023
3b6c657
chore: update rush change
kkxxkk2019 Aug 8, 2023
22ad6dd
Merge pull request #277 from VisActor/refactor/global-window-rename
neuqzxy Aug 9, 2023
372198d
chore: merge develop
neuqzxy Aug 9, 2023
4551702
Merge branch 'develop' into dev/0.14.0
neuqzxy Aug 9, 2023
54d1cd1
chore: merge dev/0.14.0
neuqzxy Aug 9, 2023
d785714
Merge pull request #268 from VisActor/feat/containerAlign-for-line-axis
neuqzxy Aug 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bug-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: ['main']
pull_request:
branches: ['main', 'develop']
branches: ['main', 'develop', 'dev/**']

jobs:
build:
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Print All Github Environment Variables
run: env

- name: Update rush
run: node common/scripts/install-run-rush.js update --bypass-policy

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Unit test CI

on:
pull_request:
branches: ['main', 'develop']
branches: ['main', 'develop', 'dev/**']

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "feat: add `verticalMinSize` and `containerAlign` for line type axis, `verticalMinSize` is used to set the minumum vertical size of axis, and `containerAlign` is to set the all labels's alignment in axis container, support https://github.com/VisActor/VChart/issues/380",
"type": "minor"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix: the axis label's textAlign and textBaseline should auto adjust when angle is set, releate https://github.com/VisActor/VChart/issues/439",
"type": "patch"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix: panel only works for line axis",
"type": "patch"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix: line axis states should set default value",
"type": "patch"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "feat(component): label component support avoidMarks",
"type": "patch"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "refactor: rename global and window to vglobal and vwindow",
"type": "minor"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender",
"comment": "feat: add connect type to line and area",
"type": "minor"
}
],
"packageName": "@visactor/vrender"
}
10 changes: 10 additions & 0 deletions common/changes/@visactor/vrender/feat-layout_2023-08-04-07-38.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender",
"comment": "feat: support flex layout",
"type": "minor"
}
],
"packageName": "@visactor/vrender"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender",
"comment": "feat: support animate-bind event",
"type": "minor"
}
],
"packageName": "@visactor/vrender"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender",
"comment": "feat: support text word-break",
"type": "minor"
}
],
"packageName": "@visactor/vrender"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender",
"comment": "feat: support for vertical layout of text graphic",
"type": "minor"
}
],
"packageName": "@visactor/vrender"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender",
"comment": "refactor: rename global and window to vglobal and vwindow",
"type": "minor"
}
],
"packageName": "@visactor/vrender"
}
4 changes: 2 additions & 2 deletions docs/demos/src/contribution/env-canvas/window-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
ICanvas,
IDomRectLike
} from '@visactor/vrender';
import { Generator, Global, BaseWindowHandlerContribution } from '@visactor/vrender';
import { Generator, VGlobal, BaseWindowHandlerContribution } from '@visactor/vrender';
import { NodeCanvas } from './canvas';
import type { IBoundsLike } from '@visactor/vutils';

Expand All @@ -21,7 +21,7 @@ export class NodeWindowHandlerContribution extends BaseWindowHandlerContribution
return null;
}

constructor(@inject(Global) private readonly global: IGlobal) {
constructor(@inject(VGlobal) private readonly global: IGlobal) {
super();
}

Expand Down
2 changes: 1 addition & 1 deletion docs/demos/src/core/stage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createStage, container } from '@visactor/vrender';

export function createAStage() {
console.log(container.get(Symbol.for('Global')));
console.log(container.get(Symbol.for('VGlobal')));
const stage = createStage({});
console.log(stage);
// const stage = new Stage({
Expand Down
73 changes: 47 additions & 26 deletions docs/demos/src/pages/area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const subP1 = [
[40, 60],
[60, 20],
[70, 30]
].map(item => ({ x: item[0], y: item[1], y1: 120, defined: item[0] !== 70 }));
].map(item => ({ x: item[0], y: item[1], y1: 120, defined: item[0] !== 20 }));

const subP2 = [
[80, 80],
Expand All @@ -28,33 +28,40 @@ const points = [
[160, 40],
[200, 20],
[240, 50]
].map(item => ({ x: item[0], y: item[1], y1: 120, defined: item[0] !== 70 }));
].map(item => ({ x: item[0], y: item[1], y1: 120, defined: item[0] !== 40 && item[0] !== 70 }));

export const page = () => {
const graphics: IGraphic[] = [];
// ['linear', 'step', 'stepBefore', 'stepAfter', 'basis', 'monotoneX', 'monotoneY'].forEach((type, i) => {
// graphics.push(
// createArea({
// points,
// curveType: type as any,
// x: ((i * 300) % 900) + 100,
// y: Math.floor((i * 300) / 900) * 200,
// stroke: ['black', false],
// fill: {
// gradient: 'linear',
// x0: 0,
// y0: 0,
// x1: 1,
// y1: 0,
// stops: [
// { offset: 0, color: 'green' },
// { offset: 0.5, color: 'orange' },
// { offset: 1, color: 'red' }
// ]
// }
// })
// );
// });
['linear', 'step', 'stepBefore', 'stepAfter', 'basis', 'monotoneX', 'monotoneY'].forEach((type, i) => {
graphics.push(
createArea({
points,
curveType: type as any,
x: ((i * 300) % 900) + 100,
y: Math.floor((i * 300) / 900) * 200,
stroke: ['black', false],
fill: {
gradient: 'linear',
x0: 0,
y0: 0,
x1: 1,
y1: 0,
stops: [
{ offset: 0, color: 'green' },
{ offset: 0.5, color: 'orange' },
{ offset: 1, color: 'red' }
]
},
clipRange: 0.3,
connectedType: 'connect',
connectedX: null,
connectedY: 100,
connectedStyle: {
fill: 'grey'
}
})
);
});

['linear', 'step', 'stepBefore', 'stepAfter', 'basis', 'monotoneX', 'monotoneY'].forEach((type, i) => {
i += 7;
Expand All @@ -65,7 +72,16 @@ export const page = () => {
x: ((i * 300) % 900) + 100,
y: Math.floor((i * 300) / 900) * 200,
segments: [
{ points: subP1, fill: colorPools[3], stroke: ['red', false], lineWidth: 10 },
{
points: subP1,
fill: colorPools[3],
stroke: ['red', false],
lineWidth: 10,
connectedType: 'connect',
connectedStyle: {
fill: 'grey'
}
},
{
points: subP2,
stroke: ['red', false],
Expand All @@ -74,12 +90,17 @@ export const page = () => {
textureColor: 'grey'
}
],
connectedType: 'connect',
fill: true,
stroke: true
})
);
});

graphics.forEach(item => {
item.animate().to({ clipRange: 0 }, 0, 'linear').to({ clipRange: 1 }, 10000, 'linear');
});

const stage = createStage({
canvas: document.getElementById('main'),
autoRender: true
Expand Down
42 changes: 42 additions & 0 deletions docs/demos/src/pages/flex.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { createStage, createGroup, createRect, container, IGraphic, global } from '@visactor/vrender';

// container.load(roughModule);

export const page = () => {
const group = createGroup({
x: 100,
y: 100,
background: 'red',
width: 300,
height: 400,
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'flex-start',
alignContent: 'center'
});

// 添加10个rect
new Array(10).fill(0).forEach(() => {
group.add(
createRect({
x: 10,
y: 10,
width: 70,
height: 60,
fill: 'green',
boundsPadding: [0, 6, 6, 0]
})
);
});

const stage = createStage({
canvas: 'main',
width: 1200,
height: 600,
enableLayout: true
});

stage.defaultLayer.add(group);

stage.render(undefined, { renderStyle: 'rough' });
};
4 changes: 4 additions & 0 deletions docs/demos/src/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,9 @@ export const pages = [
{
title: 'animate-3d',
path: 'animate-3d'
},
{
title: 'flex布局',
path: 'flex'
}
];
Loading