Fix sidebar

This commit is contained in:
space-nuko
2023-04-07 06:30:21 -05:00
parent b0c5e938b8
commit e62994aa86
2 changed files with 24 additions and 27 deletions

View File

@@ -108,19 +108,10 @@ export default class ComfyApp {
}
resizeCanvas() {
// get current size of the canvas
let rect = this.canvasEl.parentElement.getBoundingClientRect();
// increase the actual size of our canvas
this.canvasEl.width = rect.width * window.devicePixelRatio;
this.canvasEl.height = rect.height * window.devicePixelRatio;
// ensure all drawing operations are scaled
this.canvasCtx.scale(window.devicePixelRatio, window.devicePixelRatio);
// scale everything down using CSS
this.canvasEl.style.width = rect.width + 'px';
this.canvasEl.style.height = rect.height + 'px';
this.canvasEl.width = this.canvasEl.parentElement.offsetWidth;
this.canvasEl.height = this.canvasEl.parentElement.offsetHeight;
this.canvasEl.style.width = ""
this.canvasEl.style.height = ""
this.lCanvas.draw(true, true);
}