File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 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({
477477
478478 if ( name === 'button_press' ) {
479479 // 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 ) {
481482 that . resizing = true ;
482483 return ;
483484 } else {
@@ -490,6 +491,16 @@ var MPLCanvasView = widgets.DOMWidgetView.extend({
490491 that . resizing = false ;
491492 }
492493
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+
493504 // Rate-limit the position text updates so that we don't overwhelm the
494505 // system.
495506 if ( Date . now ( ) > last_update + 16 ) {
You can’t perform that action at this time.
0 commit comments