diff --git a/examples/simple.js b/examples/simple.js index cf916ca..4adac23 100644 --- a/examples/simple.js +++ b/examples/simple.js @@ -10,6 +10,7 @@ class Test extends Component { align: { points: ['cc', 'cc'], }, + sourceWidth: 50, }; componentDidMount() { @@ -65,6 +66,13 @@ class Test extends Component { this.$align.forceAlign(); }; + toggleSourceSize = () => { + this.setState({ + // eslint-disable-next-line react/no-access-state-in-setstate + sourceWidth: this.state.sourceWidth + 10, + }); + }; + render() { const { random, randomWidth } = this.state; @@ -79,6 +87,10 @@ class Test extends Component { Force align     + +