File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 44
55### Fixed
66
7+ - Fixed redraw on browser zoom (bug since 0.9.0).
78- TypeScript definition fixed, measures can contain null values.
89
910### Added
1011
1112- Animation control object expose properties ` position ` , ` direction ` , ` speed `
1213 and ` playState ` to be able to query the current state of the animation, and
13- to be more conform with the Web Animation API. Old methods got deprecated.
14+ to be more conform with the Web Animation API.
1415
1516## [ 0.9.1] - 2023-11-15
1617
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class HtmlCanvas implements Plugin {
2424 private _mainCanvas : HTMLCanvasElement
2525 private _context : CanvasRenderingContext2D
2626 private _resizeObserver : ResizeObserver
27+ private _resizeHandler : ( ) => void
2728 private _prevUpdateHash : string = ''
2829 private _scaleFactor : number = 1
2930 private _cssWidth : number = 1
@@ -71,9 +72,14 @@ export class HtmlCanvas implements Plugin {
7172 this . _context = ctx
7273 this . calcSize ( )
7374 this . _resizeObserver = this . _createResizeObserverFor ( this . _mainCanvas )
75+ this . _resizeHandler = ( ) : void => {
76+ this . onchange ( )
77+ }
78+ window . addEventListener ( 'resize' , this . _resizeHandler )
7479 }
7580
7681 destruct ( ) : void {
82+ window . removeEventListener ( 'resize' , this . _resizeHandler )
7783 this . _resizeObserver . disconnect ( )
7884 if ( this . _container ) this . _container . removeChild ( this . _mainCanvas )
7985 }
You can’t perform that action at this time.
0 commit comments