File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -477,7 +477,8 @@ var MPLCanvasView = widgets.DOMWidgetView.extend({
477
477
478
478
if ( name === 'button_press' ) {
479
479
// If clicking on the resize handle
480
- if ( canvas_pos . x >= that . top_canvas . width - that . resize_handle_size && canvas_pos . y >= that . top_canvas . height - that . resize_handle_size ) {
480
+ if ( canvas_pos . x >= that . top_canvas . width - that . resize_handle_size &&
481
+ canvas_pos . y >= that . top_canvas . height - that . resize_handle_size ) {
481
482
that . resizing = true ;
482
483
return ;
483
484
} else {
@@ -490,6 +491,16 @@ var MPLCanvasView = widgets.DOMWidgetView.extend({
490
491
that . resizing = false ;
491
492
}
492
493
494
+ if ( name === 'motion_notify' ) {
495
+ // If the mouse is on the handle, change the cursor style
496
+ if ( canvas_pos . x >= that . top_canvas . width - that . resize_handle_size &&
497
+ canvas_pos . y >= that . top_canvas . height - that . resize_handle_size ) {
498
+ that . top_canvas . style . cursor = 'nw-resize' ;
499
+ } else {
500
+ that . top_canvas . style . cursor = that . model . get ( '_cursor' ) ;
501
+ }
502
+ }
503
+
493
504
// Rate-limit the position text updates so that we don't overwhelm the
494
505
// system.
495
506
if ( Date . now ( ) > last_update + 16 ) {
You can’t perform that action at this time.
0 commit comments