Skip to content

Commit

Permalink
- Fix: canvas height not correctly updated after resize.
Browse files Browse the repository at this point in the history
- Version 0.8.1
  • Loading branch information
aukedejong committed Mar 22, 2023
1 parent 9222416 commit 0fb146a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WindRoseCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {WindSpeedConverter} from "./WindSpeedConverter";

/* eslint no-console: 0 */
console.info(
`%c WINROSE-CARD %c Version 0.8.0 `,
`%c WINROSE-CARD %c Version 0.8.1 `,
'color: orange; font-weight: bold; background: black',
'color: white; font-weight: bold; background: dimgray',
);
Expand Down Expand Up @@ -219,9 +219,9 @@ export class WindRoseCard extends LitElement {
// console.log('updateCanvasSize()', canvasWidth);

this.canvas.width = canvasWidth;
this.canvas.height = this.windRoseConfigFactory.canvasHeight as number;
const windRoseConfig = this.windRoseConfigFactory.createWindRoseConfig(canvasWidth);
this.windRoseCanvas = new WindRoseCanvas(windRoseConfig, this.windSpeedConverter);
this.canvas.height = this.windRoseConfigFactory.canvasHeight as number;

const windBarConfigs = this.windRoseConfigFactory.createWindBarConfigs(canvasWidth);
this.windBarCanvases = [];
Expand Down

0 comments on commit 0fb146a

Please sign in to comment.