system2k / NodeWorldOfText

MIT License
25 stars 22 forks source link

Canvas pans on some non-canvas elements #175

Open LimeSlime888 opened 2 months ago

LimeSlime888 commented 2 months ago

On line 3959 ~ 3960 of /frontend/static/yw/javascript/owot.js:

    if(closest(e.target, getChatfield())) return;
    if(closest(e.target, elm.confirm_js)) return;

The function only checks if the mouse is on the current chatfield or the window that pops up to confirm whether you want to run code in a JavaScript link. Expected behaviour: Using the scroll wheel while the mouse is on non-canvas elements does not pan the canvas. Observed behaviour: Using the scroll wheel while the mouse is on GUI elements other than the chatfield and JavaScript confirmation also pans the canvas.

system2k commented 1 month ago

I believe this is intended behavior, but I can look into it further