@@ -238,7 +238,7 @@ export class MPLCanvasModel extends DOMWidgetModel {
238
238
const url_creator = window . URL || window . webkitURL ;
239
239
240
240
const buffer = new Uint8Array (
241
- ArrayBuffer . isView ( buffers [ 0 ] ) ? buffers [ 0 ] . buffer : buffers [ 0 ]
241
+ ArrayBuffer . isView ( buffers [ 0 ] ) ? buffers [ 0 ] . buffer : buffers [ 0 ] ,
242
242
) ;
243
243
const blob = new Blob ( [ buffer ] , { type : 'image/png' } ) ;
244
244
const image_url = url_creator . createObjectURL ( blob ) ;
@@ -277,7 +277,7 @@ export class MPLCanvasModel extends DOMWidgetModel {
277
277
} catch ( e ) {
278
278
console . log (
279
279
"No handler for the '" + msg_type + "' message type: " ,
280
- msg
280
+ msg ,
281
281
) ;
282
282
return ;
283
283
}
@@ -330,7 +330,7 @@ export class MPLCanvasModel extends DOMWidgetModel {
330
330
0 ,
331
331
0 ,
332
332
this . offscreen_canvas . width ,
333
- this . offscreen_canvas . height
333
+ this . offscreen_canvas . height ,
334
334
) ;
335
335
}
336
336
@@ -412,23 +412,23 @@ export class MPLCanvasView extends DOMWidgetView {
412
412
model_events ( ) {
413
413
this . model . on (
414
414
'change:header_visible' ,
415
- this . _update_header_visible . bind ( this )
415
+ this . _update_header_visible . bind ( this ) ,
416
416
) ;
417
417
this . model . on (
418
418
'change:footer_visible' ,
419
- this . _update_footer_visible . bind ( this )
419
+ this . _update_footer_visible . bind ( this ) ,
420
420
) ;
421
421
this . model . on (
422
422
'change:toolbar_visible' ,
423
- this . _update_toolbar_visible . bind ( this )
423
+ this . _update_toolbar_visible . bind ( this ) ,
424
424
) ;
425
425
this . model . on (
426
426
'change:toolbar_position' ,
427
- this . _update_toolbar_position . bind ( this )
427
+ this . _update_toolbar_position . bind ( this ) ,
428
428
) ;
429
429
this . model . on (
430
430
'change:_figure_label' ,
431
- this . _update_figure_label . bind ( this )
431
+ this . _update_figure_label . bind ( this ) ,
432
432
) ;
433
433
this . model . on ( 'change:_message' , this . _update_message . bind ( this ) ) ;
434
434
this . model . on ( 'change:_cursor' , this . _update_cursor . bind ( this ) ) ;
@@ -461,7 +461,7 @@ export class MPLCanvasView extends DOMWidgetView {
461
461
this . header . classList . add (
462
462
'jupyter-widgets' ,
463
463
'widget-label' ,
464
- 'jupyter-matplotlib-header'
464
+ 'jupyter-matplotlib-header' ,
465
465
) ;
466
466
this . _update_header_visible ( ) ;
467
467
this . _update_figure_label ( ) ;
@@ -476,7 +476,7 @@ export class MPLCanvasView extends DOMWidgetView {
476
476
const canvas_container = document . createElement ( 'div' ) ;
477
477
canvas_container . classList . add (
478
478
'jupyter-widgets' ,
479
- 'jupyter-matplotlib-canvas-container'
479
+ 'jupyter-matplotlib-canvas-container' ,
480
480
) ;
481
481
this . figure . appendChild ( canvas_container ) ;
482
482
@@ -485,7 +485,7 @@ export class MPLCanvasView extends DOMWidgetView {
485
485
canvas_div . style . clear = 'both' ;
486
486
canvas_div . classList . add (
487
487
'jupyter-widgets' ,
488
- 'jupyter-matplotlib-canvas-div'
488
+ 'jupyter-matplotlib-canvas-div' ,
489
489
) ;
490
490
491
491
canvas_div . addEventListener ( 'keydown' , this . key_event ( 'key_press' ) ) ;
@@ -514,35 +514,35 @@ export class MPLCanvasView extends DOMWidgetView {
514
514
top_canvas . addEventListener ( 'dblclick' , this . mouse_event ( 'dblclick' ) ) ;
515
515
top_canvas . addEventListener (
516
516
'mousedown' ,
517
- this . mouse_event ( 'button_press' )
517
+ this . mouse_event ( 'button_press' ) ,
518
518
) ;
519
519
top_canvas . addEventListener (
520
520
'mouseup' ,
521
- this . mouse_event ( 'button_release' )
521
+ this . mouse_event ( 'button_release' ) ,
522
522
) ;
523
523
top_canvas . addEventListener (
524
524
'mousemove' ,
525
525
throttle (
526
526
this . mouse_event ( 'motion_notify' ) ,
527
- this . model . get ( 'pan_zoom_throttle' )
528
- )
527
+ this . model . get ( 'pan_zoom_throttle' ) ,
528
+ ) ,
529
529
) ;
530
530
531
531
top_canvas . addEventListener (
532
532
'mouseenter' ,
533
- this . mouse_event ( 'figure_enter' )
533
+ this . mouse_event ( 'figure_enter' ) ,
534
534
) ;
535
535
top_canvas . addEventListener (
536
536
'mouseleave' ,
537
- this . mouse_event ( 'figure_leave' )
537
+ this . mouse_event ( 'figure_leave' ) ,
538
538
) ;
539
539
540
540
top_canvas . addEventListener (
541
541
'wheel' ,
542
542
throttle (
543
543
this . mouse_event ( 'scroll' ) ,
544
- this . model . get ( 'pan_zoom_throttle' )
545
- )
544
+ this . model . get ( 'pan_zoom_throttle' ) ,
545
+ ) ,
546
546
) ;
547
547
548
548
canvas_div . appendChild ( canvas ) ;
@@ -563,7 +563,7 @@ export class MPLCanvasView extends DOMWidgetView {
563
563
564
564
async _init_toolbar ( ) {
565
565
this . toolbar_view = ( await this . create_child_view (
566
- this . model . get ( 'toolbar' )
566
+ this . model . get ( 'toolbar' ) ,
567
567
) ) as ToolbarView ;
568
568
569
569
this . figure . appendChild ( this . toolbar_view . el ) ;
@@ -590,7 +590,7 @@ export class MPLCanvasView extends DOMWidgetView {
590
590
0 ,
591
591
0 ,
592
592
this . canvas . width ,
593
- this . canvas . height
593
+ this . canvas . height ,
594
594
) ;
595
595
} else {
596
596
this . context . drawImage ( this . model . offscreen_canvas , 0 , 0 ) ;
@@ -600,7 +600,7 @@ export class MPLCanvasView extends DOMWidgetView {
600
600
0 ,
601
601
0 ,
602
602
this . top_canvas . width ,
603
- this . top_canvas . height
603
+ this . top_canvas . height ,
604
604
) ;
605
605
606
606
// Draw rubberband
@@ -619,7 +619,7 @@ export class MPLCanvasView extends DOMWidgetView {
619
619
this . model . get ( '_rubberband_x' ) ,
620
620
this . model . get ( '_rubberband_y' ) ,
621
621
this . model . get ( '_rubberband_width' ) ,
622
- this . model . get ( '_rubberband_height' )
622
+ this . model . get ( '_rubberband_height' ) ,
623
623
) ;
624
624
}
625
625
@@ -631,7 +631,7 @@ export class MPLCanvasView extends DOMWidgetView {
631
631
this . top_canvas . height - this . resize_handle_size ,
632
632
// Stop
633
633
this . top_canvas . width ,
634
- this . top_canvas . height
634
+ this . top_canvas . height ,
635
635
) ;
636
636
gradient . addColorStop ( 0 , 'white' ) ;
637
637
gradient . addColorStop ( 1 , 'black' ) ;
@@ -643,15 +643,15 @@ export class MPLCanvasView extends DOMWidgetView {
643
643
this . top_context . beginPath ( ) ;
644
644
this . top_context . moveTo (
645
645
this . top_canvas . width ,
646
- this . top_canvas . height
646
+ this . top_canvas . height ,
647
647
) ;
648
648
this . top_context . lineTo (
649
649
this . top_canvas . width ,
650
- this . top_canvas . height - this . resize_handle_size
650
+ this . top_canvas . height - this . resize_handle_size ,
651
651
) ;
652
652
this . top_context . lineTo (
653
653
this . top_canvas . width - this . resize_handle_size ,
654
- this . top_canvas . height
654
+ this . top_canvas . height ,
655
655
) ;
656
656
this . top_context . closePath ( ) ;
657
657
this . top_context . fill ( ) ;
@@ -670,7 +670,7 @@ export class MPLCanvasView extends DOMWidgetView {
670
670
this . footer . classList . add (
671
671
'jupyter-widgets' ,
672
672
'widget-label' ,
673
- 'jupyter-matplotlib-footer'
673
+ 'jupyter-matplotlib-footer' ,
674
674
) ;
675
675
this . _update_footer_visible ( ) ;
676
676
this . _update_message ( ) ;
0 commit comments