From e9801c8697d0d970c45562e19215cf2282dc717a Mon Sep 17 00:00:00 2001 From: Ray Schamp <ray@scratch.mit.edu> Date: Wed, 28 Sep 2016 17:35:03 -0400 Subject: [PATCH] Set default stage size --- src/components/stage.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/stage.js b/src/components/stage.js index 9af7f5a02..2f872371b 100644 --- a/src/components/stage.js +++ b/src/components/stage.js @@ -6,17 +6,23 @@ class Stage extends React.Component { <canvas className="scratch-stage" ref={this.props.stageRef} + width={this.props.width} + height={this.props.height} /> ); } } Stage.propTypes = { - stageRef: React.PropTypes.func + stageRef: React.PropTypes.func, + width: React.PropTypes.number, + height: React.PropTypes.number }; Stage.defaultProps = { - stageRef: function () {} + stageRef: function () {}, + width: 480, + height: 360 }; module.exports = Stage; -- GitLab