@@ -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
top_canvas . addEventListener ( 'wheel' , ( event : any ) => {
548
548
if ( this . model . get ( 'capture_scroll' ) ) {
@@ -568,7 +568,7 @@ export class MPLCanvasView extends DOMWidgetView {
568
568
569
569
async _init_toolbar ( ) {
570
570
this . toolbar_view = ( await this . create_child_view (
571
- this . model . get ( 'toolbar' )
571
+ this . model . get ( 'toolbar' ) ,
572
572
) ) as ToolbarView ;
573
573
574
574
this . figure . appendChild ( this . toolbar_view . el ) ;
@@ -595,7 +595,7 @@ export class MPLCanvasView extends DOMWidgetView {
595
595
0 ,
596
596
0 ,
597
597
this . canvas . width ,
598
- this . canvas . height
598
+ this . canvas . height ,
599
599
) ;
600
600
} else {
601
601
this . context . drawImage ( this . model . offscreen_canvas , 0 , 0 ) ;
@@ -605,7 +605,7 @@ export class MPLCanvasView extends DOMWidgetView {
605
605
0 ,
606
606
0 ,
607
607
this . top_canvas . width ,
608
- this . top_canvas . height
608
+ this . top_canvas . height ,
609
609
) ;
610
610
611
611
// Draw rubberband
@@ -624,7 +624,7 @@ export class MPLCanvasView extends DOMWidgetView {
624
624
this . model . get ( '_rubberband_x' ) ,
625
625
this . model . get ( '_rubberband_y' ) ,
626
626
this . model . get ( '_rubberband_width' ) ,
627
- this . model . get ( '_rubberband_height' )
627
+ this . model . get ( '_rubberband_height' ) ,
628
628
) ;
629
629
}
630
630
@@ -636,7 +636,7 @@ export class MPLCanvasView extends DOMWidgetView {
636
636
this . top_canvas . height - this . resize_handle_size ,
637
637
// Stop
638
638
this . top_canvas . width ,
639
- this . top_canvas . height
639
+ this . top_canvas . height ,
640
640
) ;
641
641
gradient . addColorStop ( 0 , 'white' ) ;
642
642
gradient . addColorStop ( 1 , 'black' ) ;
@@ -648,15 +648,15 @@ export class MPLCanvasView extends DOMWidgetView {
648
648
this . top_context . beginPath ( ) ;
649
649
this . top_context . moveTo (
650
650
this . top_canvas . width ,
651
- this . top_canvas . height
651
+ this . top_canvas . height ,
652
652
) ;
653
653
this . top_context . lineTo (
654
654
this . top_canvas . width ,
655
- this . top_canvas . height - this . resize_handle_size
655
+ this . top_canvas . height - this . resize_handle_size ,
656
656
) ;
657
657
this . top_context . lineTo (
658
658
this . top_canvas . width - this . resize_handle_size ,
659
- this . top_canvas . height
659
+ this . top_canvas . height ,
660
660
) ;
661
661
this . top_context . closePath ( ) ;
662
662
this . top_context . fill ( ) ;
@@ -675,7 +675,7 @@ export class MPLCanvasView extends DOMWidgetView {
675
675
this . footer . classList . add (
676
676
'jupyter-widgets' ,
677
677
'widget-label' ,
678
- 'jupyter-matplotlib-footer'
678
+ 'jupyter-matplotlib-footer' ,
679
679
) ;
680
680
this . _update_footer_visible ( ) ;
681
681
this . _update_message ( ) ;
0 commit comments