Commit Graph
4 Commits
Author SHA1 Message Date
Christopher Willis-Ford 7294028274 Use Object.keys for stage size prop type checks 2018-06-12 10:40:50 -07:00
Christopher Willis-Ford f57295d08c Split STAGE_SIZE enum into two & clarify purposes
Also remove some obsolete code
2018-06-12 01:15:03 -07:00
Christopher Willis-Ford cfb55514b5 Implement all staging logic in terms of stageSize
Pass a `stageSize` property down from a centralized `MediaQuery` in the
GUI component, and control the size of the stage and all surrounding
elements based on that value. Note that this is a pure property and is
not stored in the Redux state, since we gain access to the results of
the media query during `render()` and we shouldn't change Redux state
during `render()`.

Some stage-adjacent elements don't yet react correctly to the smallest
stage size.
2018-06-12 01:15:01 -07:00
chrisgarrity be208ba10d Player mode (#1909)
* Player mode

Add isPlayerOnly property on GUI. Move isFullScreen into mode reducer with isPlayerOnly.

Full screen needs to be a separate prop so that GUI knows what to show when exiting full-screen (either player-only or full editor).

- set `gui-body * {box-sizing: border-box;}` instead of expecting it to be set by the enclosing component/playground, and removed uses of content-box (adjusting sizes as needed) 
- Added `!isPlayerOnly` to the conditions for draggable sprites
- rewrote player example to use player mode.
2018-05-01 10:30:42 -04:00