diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-10 14:19:35 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-10 14:19:35 +0200 |
| commit | 9a1cac006a80098f90f2febf751632c7e5ffbfa0 (patch) | |
| tree | cb255601d15b4deef59f3162407412681c5ac7de /frontend/views/page/components/page.editor.js | |
| parent | 107bf7b019215634741b11dbf07fc23c65a072b6 (diff) | |
setting page background color
Diffstat (limited to 'frontend/views/page/components/page.editor.js')
| -rw-r--r-- | frontend/views/page/components/page.editor.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/views/page/components/page.editor.js b/frontend/views/page/components/page.editor.js index 297f7e7..3878208 100644 --- a/frontend/views/page/components/page.editor.js +++ b/frontend/views/page/components/page.editor.js @@ -158,7 +158,7 @@ class PageEditor extends Component { } render(){ - if (!this.state.bounds) { + if (!this.state.bounds || !this.props.page.show.res) { return ( <div className='page' ref={this.pageRef} /> ) @@ -167,8 +167,9 @@ class PageEditor extends Component { const currentTile = this.state.tile const currentBox = this.state.box const { res } = this.props.page.show - return ( - <div className='page' ref={this.pageRef}> + const pageStyle = { backgroundColor: res.settings.background_color || '#000000' } + return ( + <div className='page' ref={this.pageRef} style={pageStyle}> {res.tiles.map(tile => { if (temporaryTile && temporaryTile.id === tile.id) { tile = temporaryTile |
