fix: Fix centering element on init (#2445)

Co-authored-by: Andrés Rivera <andres@MBP.local>
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Andrés Rivera 2020-12-16 12:17:39 -05:00 committed by GitHub
parent 23f21434ff
commit fb582b45db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 0 deletions

View file

@ -593,6 +593,8 @@ class App extends React.Component<ExcalidrawProps, AppState> {
scene.elements,
{
...scene.appState,
width: this.state.width,
height: this.state.height,
offsetTop: this.state.offsetTop,
offsetLeft: this.state.offsetLeft,
},