Skip to content

Commit

Permalink
[react] explicitly set deck canvas position (#4124)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress authored and Xiaoji Chen committed Jan 9, 2020
1 parent 5c4e865 commit 71811d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/react/src/deckgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ const propTypes = Deck.getPropTypes(PropTypes);

const defaultProps = Deck.defaultProps;

const CANVAS_STYLE = {
left: 0,
top: 0
};

export default class DeckGL extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -206,7 +211,8 @@ export default class DeckGL extends React.Component {

const canvas = createElement('canvas', {
key: 'canvas',
ref: this._canvasRef
ref: this._canvasRef,
style: CANVAS_STYLE
});

// Render deck.gl as the last child
Expand Down

0 comments on commit 71811d5

Please sign in to comment.