Skip to content

Commit

Permalink
Merge pull request #9 from Perkovec/fixed-window-resize
Browse files Browse the repository at this point in the history
Fixed window resize
  • Loading branch information
Perkovec authored Feb 2, 2020
2 parents cfc65c1 + 13c7c06 commit cb32cf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export class App {
this.camera.aspect = this.editorContainer.clientWidth / this.editorContainer.clientHeight;
this.camera.updateProjectionMatrix();

this.renderer.setSize(this.editorContainer.clientWidth, this.editorContainer.clientHeight);
this.renderer.setSize(this.editorContainer.clientWidth, this.editorContainer.clientHeight);
this.render();
}

onDocumentMouseMove(event) {
Expand Down
4 changes: 3 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ html, body {

.editor-layout {
width: 100%;
max-width: 100%;
height: 100%;
display: flex;
}

.editor-layout #editor {
width: 100%;
flex: 1;
}

.editor-layout #editor canvas {
outline: none;
display: block;
max-width: 100%;
}

.brush-color-container {
Expand Down

0 comments on commit cb32cf3

Please sign in to comment.