Skip to content

Commit

Permalink
Use clientWidth/Height for new NiiVue canvas.
Browse files Browse the repository at this point in the history
  • Loading branch information
haehn committed Nov 9, 2023
1 parent 9fe8aa2 commit a0a29ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frameworks/niivue.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export class NiiVue extends Framework {
let originalcanvas = this.instance.canvas;

let newcanvas = window.document.createElement('canvas');
newcanvas.width = originalcanvas.width;
newcanvas.height = originalcanvas.height;
newcanvas.width = originalcanvas.clientWidth;
newcanvas.height = originalcanvas.clientHeight;

// put new_pixels down
let ctx = newcanvas.getContext('2d');
Expand Down

0 comments on commit a0a29ee

Please sign in to comment.