Skip to content

Commit

Permalink
Merge pull request #224 from VisActor/feat/upgrade-vrender-0.22.0-vst…
Browse files Browse the repository at this point in the history
…ory.5

Feat/upgrade vrender 0.22.0 vstory.5
  • Loading branch information
neuqzxy authored Jan 18, 2025
2 parents 9038e8a + 8a463a0 commit 0302766
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 229 deletions.
8 changes: 4 additions & 4 deletions common/config/rush/pnpm-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
* PNPM documentation: https://pnpm.io/package_json#pnpmoverrides
*/
"globalOverrides": {
// "@visactor/vrender": "0.21.5-vstory.2",
// "@visactor/vrender-core": "0.21.5-vstory.2",
// "@visactor/vrender-kits": "0.21.5-vstory.2",
// "@visactor/vrender-components": "0.21.5-vstory.2",
// "@visactor/vrender": "0.22.0-vstory.5",
// "@visactor/vrender-core": "0.22.0-vstory.5",
// "@visactor/vrender-kits": "0.22.0-vstory.5",
// "@visactor/vrender-components": "0.22.0-vstory.5",
// "@visactor/vscale": "0.18.5"
// "example2": "npm:@company/example2@^1.0.0"
},
Expand Down
352 changes: 169 additions & 183 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/examples/en/character/vgraphic.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const characterList = [

const story = new VStory.Story(null, {
dom: CONTAINER_ID,
width: 400,
width: 500,
height: 400,
scaleX: 'auto',
scaleY: 'auto',
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/examples/zh/character/vgraphic.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const characterList = [

const story = new VStory.Story(null, {
dom: CONTAINER_ID,
width: 400,
width: 500,
height: 400,
scaleX: 'auto',
scaleY: 'auto',
Expand Down
10 changes: 5 additions & 5 deletions packages/vstory-animate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"test-watch": "DEBUG_MODE=1 jest --watch"
},
"dependencies": {
"@visactor/vchart": "1.13.3-vstory.3",
"@visactor/vchart": "1.13.5-vstory.1",
"@visactor/vtable": "1.14.4-alpha.0",
"@visactor/vrender": "0.21.5-vstory.2",
"@visactor/vrender-core": "0.21.5-vstory.2",
"@visactor/vrender-kits": "0.21.5-vstory.2",
"@visactor/vrender-components": "0.21.5-vstory.2",
"@visactor/vrender": "0.22.0-vstory.5",
"@visactor/vrender-core": "0.22.0-vstory.5",
"@visactor/vrender-kits": "0.22.0-vstory.5",
"@visactor/vrender-components": "0.22.0-vstory.5",
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
Expand Down
10 changes: 5 additions & 5 deletions packages/vstory-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"test-watch": "DEBUG_MODE=1 jest --watch"
},
"dependencies": {
"@visactor/vchart": "1.13.3-vstory.3",
"@visactor/vchart": "1.13.5-vstory.1",
"@visactor/vtable": "1.14.4-alpha.0",
"@visactor/vrender": "0.21.5-vstory.2",
"@visactor/vrender-core": "0.21.5-vstory.2",
"@visactor/vrender-kits": "0.21.5-vstory.2",
"@visactor/vrender-components": "0.21.5-vstory.2",
"@visactor/vrender": "0.22.0-vstory.5",
"@visactor/vrender-core": "0.22.0-vstory.5",
"@visactor/vrender-kits": "0.22.0-vstory.5",
"@visactor/vrender-components": "0.22.0-vstory.5",
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
Expand Down
8 changes: 4 additions & 4 deletions packages/vstory-core/src/utils/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export function getLayoutFromWidget(w: Partial<IWidgetData> | IRect, character:
let width = (w as any).width;
let height = (w as any).height;
const stage = character.canvas.getStage();
if (!Number.isFinite(width)) {
width = stage.width - x - ((w as any).right ?? 0);
if (!isFinite(width) && isFinite((w as any).right)) {
width = stage.width - x - (w as any).right;
}
if (!Number.isFinite(height)) {
height = stage.height - y - ((w as any).bottom ?? 0);
if (!isFinite(height) && isFinite((w as any).bottom)) {
height = stage.height - y - (w as any).bottom;
}
// const width = 'width' in w ? w.width : <number>(w as any).right - <number>w.left;
// const height = 'height' in w ? w.height : <number>(w as any).bottom - <number>w.top;
Expand Down
10 changes: 5 additions & 5 deletions packages/vstory-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"test-watch": "DEBUG_MODE=1 jest --watch"
},
"dependencies": {
"@visactor/vchart": "1.13.3-vstory.3",
"@visactor/vchart": "1.13.5-vstory.1",
"@visactor/vtable": "1.14.4-alpha.0",
"@visactor/vrender": "0.21.5-vstory.2",
"@visactor/vrender-core": "0.21.5-vstory.2",
"@visactor/vrender-kits": "0.21.5-vstory.2",
"@visactor/vrender-components": "0.21.5-vstory.2",
"@visactor/vrender": "0.22.0-vstory.5",
"@visactor/vrender-core": "0.22.0-vstory.5",
"@visactor/vrender-kits": "0.22.0-vstory.5",
"@visactor/vrender-components": "0.22.0-vstory.5",
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
Expand Down
2 changes: 1 addition & 1 deletion packages/vstory-editor/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface IEditSelection {
// 是否 开始/继续 编辑 返回false的话,会导致当前编辑结束
checkAction: (actionInfo: IEditActionInfo | IEditSelectionInfo) => boolean;

checkOver?: (actionInfo: IEditActionInfo | IEditSelectionInfo) => void;
checkOver: (actionInfo: IEditActionInfo | IEditSelectionInfo) => void;

// 编辑开始
startEdit: (actionInfo: IEditActionInfo | IEditSelectionInfo, emitEvent?: boolean) => void;
Expand Down
10 changes: 5 additions & 5 deletions packages/vstory-external/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"test-watch": "DEBUG_MODE=1 jest --watch"
},
"dependencies": {
"@visactor/vchart": "1.13.3-vstory.3",
"@visactor/vchart": "1.13.5-vstory.1",
"@visactor/vtable": "1.14.4-alpha.0",
"@visactor/vrender": "0.21.5-vstory.2",
"@visactor/vrender-core": "0.21.5-vstory.2",
"@visactor/vrender-kits": "0.21.5-vstory.2",
"@visactor/vrender-components": "0.21.5-vstory.2",
"@visactor/vrender": "0.22.0-vstory.5",
"@visactor/vrender-core": "0.22.0-vstory.5",
"@visactor/vrender-kits": "0.22.0-vstory.5",
"@visactor/vrender-components": "0.22.0-vstory.5",
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
Expand Down
10 changes: 5 additions & 5 deletions packages/vstory-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"test-watch": "DEBUG_MODE=1 jest --watch"
},
"dependencies": {
"@visactor/vchart": "1.13.3-vstory.3",
"@visactor/vchart": "1.13.5-vstory.1",
"@visactor/vtable": "1.14.4-alpha.0",
"@visactor/vrender": "0.21.5-vstory.2",
"@visactor/vrender-core": "0.21.5-vstory.2",
"@visactor/vrender-kits": "0.21.5-vstory.2",
"@visactor/vrender-components": "0.21.5-vstory.2",
"@visactor/vrender": "0.22.0-vstory.5",
"@visactor/vrender-core": "0.22.0-vstory.5",
"@visactor/vrender-kits": "0.22.0-vstory.5",
"@visactor/vrender-components": "0.22.0-vstory.5",
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
Expand Down
10 changes: 5 additions & 5 deletions packages/vstory-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"test-watch": "DEBUG_MODE=1 jest --watch"
},
"dependencies": {
"@visactor/vchart": "1.13.3-vstory.3",
"@visactor/vchart": "1.13.5-vstory.1",
"@visactor/vtable": "1.14.4-alpha.0",
"@visactor/vrender": "0.21.5-vstory.2",
"@visactor/vrender-core": "0.21.5-vstory.2",
"@visactor/vrender-kits": "0.21.5-vstory.2",
"@visactor/vrender-components": "0.21.5-vstory.2",
"@visactor/vrender": "0.22.0-vstory.5",
"@visactor/vrender-core": "0.22.0-vstory.5",
"@visactor/vrender-kits": "0.22.0-vstory.5",
"@visactor/vrender-components": "0.22.0-vstory.5",
"@visactor/vutils": "~0.18.17",
"@visactor/vchart-extension": "0.0.3-vstory.2",
"@visactor/vdataset": "~0.18.17",
Expand Down
1 change: 0 additions & 1 deletion packages/vstory/demo/src/demos/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const TextAnimate = () => {
position: {
top: 100,
left: 100,
width: 200,
height: 100
},
options: {
Expand Down
11 changes: 7 additions & 4 deletions packages/vstory/demo/src/demos/component/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export const TextComponent = () => {
const player = new Player(story);
story.init(player);

['这是普通的一大段内容', '这是Blur的一大段内容', '这是缩放的一大段内容', '这是FadeUp的一大段内容'].forEach(
(text, index) => {
['这是普通的一大段内容', '这是Blur的一大段内容', '这是缩放的一大段内容', '这是FadeUp的一大段内容']
.slice(0, 1)
.forEach((text, index) => {
story.addCharacter(
{
type: 'Text',
Expand All @@ -33,6 +34,9 @@ export const TextComponent = () => {
fontSize: 36,
fontWeight: 'bold',
fill: 'red'
},
panel: {
fill: 'blue'
}
}
},
Expand Down Expand Up @@ -74,8 +78,7 @@ export const TextComponent = () => {
]
}
);
}
);
});

player.play(-1);

Expand Down

0 comments on commit 0302766

Please sign in to comment.