From 9d89e9ca8a856dde16f72d9acce1751e4a72073e Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Thu, 31 Oct 2024 16:09:46 +0800 Subject: [PATCH] feat: reset old example --- docs/assets/examples/zh/ranking-bar/basic.md | 3 ++- docs/assets/examples/zh/site-scene/basic.md | 3 ++- docs/assets/examples/zh/unit/basic-component.md | 3 ++- docs/assets/examples/zh/unit/unit-gun-death.md | 3 ++- docs/assets/examples/zh/unit/unit-infographic.md | 15 +++------------ packages/vstory/package.json | 2 +- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/assets/examples/zh/ranking-bar/basic.md b/docs/assets/examples/zh/ranking-bar/basic.md index d8754008..b7cebb91 100644 --- a/docs/assets/examples/zh/ranking-bar/basic.md +++ b/docs/assets/examples/zh/ranking-bar/basic.md @@ -139,7 +139,8 @@ const spec = { ] }; -const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 0.9, scaleY: 0.9 } }); +const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 1, scaleY: 1 } }); +vstory.canvas.getStage().defaultLayer.scale(0.9, 0.9); window.vstory = vstory; vstory.play(); ``` diff --git a/docs/assets/examples/zh/site-scene/basic.md b/docs/assets/examples/zh/site-scene/basic.md index 3dad3f2c..e90733de 100644 --- a/docs/assets/examples/zh/site-scene/basic.md +++ b/docs/assets/examples/zh/site-scene/basic.md @@ -13280,7 +13280,8 @@ const spec = { ] }; -const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 0.5, scaleY: 0.5 } }); +const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 1, scaleY: 1 } }); +vstory.canvas.getStage().defaultLayer.scale(0.5, 0.5); window.vstory = vstory; vstory.play(); ``` diff --git a/docs/assets/examples/zh/unit/basic-component.md b/docs/assets/examples/zh/unit/basic-component.md index 5d9bb02d..86e62e3e 100644 --- a/docs/assets/examples/zh/unit/basic-component.md +++ b/docs/assets/examples/zh/unit/basic-component.md @@ -135,7 +135,8 @@ const spec = { } ] }; -const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 0.4, scaleY: 0.4 } }); +const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 1, scaleY: 1 } }); +vstory.canvas.getStage().defaultLayer.scale(0.4, 0.4); vstory.play(false); window.vstory = vstory; diff --git a/docs/assets/examples/zh/unit/unit-gun-death.md b/docs/assets/examples/zh/unit/unit-gun-death.md index 4e24641f..9a3d7684 100644 --- a/docs/assets/examples/zh/unit/unit-gun-death.md +++ b/docs/assets/examples/zh/unit/unit-gun-death.md @@ -346,7 +346,8 @@ const unitSpec = { }; // 准备一个图表 const spec = VStory.generateSpec(unitSpec); -const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 0.5, scaleY: 0.5 } }); +const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 1, scaleY: 1 } }); +vstory.canvas.getStage().defaultLayer.scale(0.5, 0.5); vstory.play(false); window.vstory = vstory; ``` diff --git a/docs/assets/examples/zh/unit/unit-infographic.md b/docs/assets/examples/zh/unit/unit-infographic.md index 11f272e3..b3da3c8a 100644 --- a/docs/assets/examples/zh/unit/unit-infographic.md +++ b/docs/assets/examples/zh/unit/unit-infographic.md @@ -109,8 +109,6 @@ const spec = { textAlign: 'center', fill: 'white', fontWeight: 200, - textAlign: 'center', - textBaseline: 'middle', textConfig: [ { text: 'According to a study conducted by ', @@ -186,8 +184,6 @@ const spec = { graphic: { text: '67%', fill: '#48A0CF', - textAlign: 'center', - textBaseline: 'middle', fontSize: 110, fontWeight: 600 } @@ -210,8 +206,6 @@ const spec = { width: 460, height: 108, wordBreak: 'break-word', - textAlign: 'center', - textBaseline: 'middle', textConfig: [ { text: 'Of over 120 CEOs plan to spend less time on hiring permanent recruits' @@ -236,9 +230,7 @@ const spec = { fill: '#48A0CF', fontSize: 110, fontWeight: 600, - stroke: '#48A0CF', - textAlign: 'center', - textBaseline: 'middle', + stroke: '#48A0CF' } } }, @@ -259,8 +251,6 @@ const spec = { width: 460, height: 108, wordBreak: 'break-word', - textAlign: 'center', - textBaseline: 'middle', textConfig: [ { text: 'Plan to grow their IT and tech teams in response to changing ways of working' @@ -374,7 +364,8 @@ const spec = { } ] }; -const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 0.4, scaleY: 0.4 } }); +const vstory = new VStory.Story(spec, { dom: CONTAINER_ID, playerOption: { scaleX: 1, scaleY: 1 } }); +vstory.canvas.getStage().defaultLayer.scale(0.4, 0.4); vstory.play(false); window.vstory = vstory; diff --git a/packages/vstory/package.json b/packages/vstory/package.json index 4c9913c2..d989048c 100644 --- a/packages/vstory/package.json +++ b/packages/vstory/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vstory", - "version": "0.0.8-alpha.2", + "version": "0.0.9-alpha.1", "description": "", "sideEffects": true, "main": "cjs/index.js",