File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ class TransformOrigin {
3434 this . y = 0 ;
3535 return ;
3636 }
37- var css = el . style . transformOrigin . split ( " " ) ;
38- this . x = parseFloat ( css [ 0 ] ) ;
39- this . y = parseFloat ( css [ 1 ] ) ;
37+ const [ x , y ] = el . style . transformOrigin . split ( " " ) ;
38+ this . x = parseFloat ( x ) ;
39+ this . y = parseFloat ( y ) ;
4040 }
4141
4242 toString ( ) {
@@ -60,7 +60,7 @@ function setZoomerVal(value: number, zoomer: HTMLInputElement) {
6060}
6161
6262function loadImage ( src : string ) : Promise < HTMLImageElement > {
63- var img = new Image ( ) ;
63+ const img = new Image ( ) ;
6464
6565 return new Promise ( function ( resolve , reject ) {
6666 img . onload = ( ) => {
@@ -300,7 +300,7 @@ export class Cropt {
300300
301301 setZoom ( value : number ) {
302302 setZoomerVal ( value , this . elements . zoomer ) ;
303- var event = new Event ( "input" ) ;
303+ const event = new Event ( "input" ) ;
304304 this . elements . zoomer . dispatchEvent ( event ) ; // triggers this.#onZoom call
305305 }
306306
You can’t perform that action at this time.
0 commit comments