Skip to content

Commit

Permalink
#226 automap mouse follow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesholdenmusic committed Dec 30, 2024
1 parent fa24874 commit d2997d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ function omouse(x,y,leftbutton,ctrl,shift,caps,alt,e){
}
}
}
}else if((usermouse.x > sidebar.x) && !automap.lock_c && (automap.offset_range_c>0) && (sidebar.mode=="parameters") && (usermouse.got_t == 2) && config.get("AUTOMAP_MOUSE_FOLLOW") && (mouse_click_actions[usermouse.got_i]==sidebar_parameter_knob)){
}else if((usermouse.x > sidebar.x) && !automap.lock_c && (automap.offset_range_c>0) && (sidebar.mode=="block") && (usermouse.got_t == 2) && config.get("AUTOMAP_MOUSE_FOLLOW") && (mouse_click_actions[usermouse.got_i]==sidebar_parameter_knob)){
var r = -1;
for(var tr=0;tr<automap.sidebar_row_ys.length;tr++){
if(usermouse.y>automap.sidebar_row_ys[tr]) r = tr;
Expand All @@ -972,6 +972,7 @@ function omouse(x,y,leftbutton,ctrl,shift,caps,alt,e){
r = Math.min(r,automap.offset_range_c);
if(automap.offset_c != r){
automap.offset_c = r;
note_poly.message("setvalue", automap.available_c, "automap_offset", automap.offset_c * automap.c_cols );
redraw_flag.flag |= 2;
}
}else if(usermouse.got_t == 7){
Expand Down

0 comments on commit d2997d2

Please sign in to comment.