davidedc / livecodelab

a web based livecoding environment
http://livecodelab.net/
MIT License
327 stars 63 forks source link

Editor cleanup #286

Closed rumblesan closed 7 years ago

rumblesan commented 7 years ago

So questions.

What's the expected behaviour of scrolling? Moving the cursor actually feels really weird now I think about it. Other editors don't do that. Should scrolling undim the editor? I'm inclined to say yes, but it also seems a bit weird. Not sure.

davidedc commented 7 years ago

Ideally scrolling should scroll the code without scrolling the cursor. But I don't think I managed to make that work, so the best next thing was to scroll the cursor. And yes I'd think it should undim the editor.

rumblesan commented 7 years ago

ok, seems that newer version of codemirror handles scrolling much better, so the mouse wheel handler isn't necessary any more.

I'm adding in a listener to the window wheel event that will undim the editor, so it's not the responsibility of the editor itself to do that. Probably makes sense to move the handler into the EditorDimmer class but I'll have a look once it's all together

rumblesan commented 7 years ago

have tested this in IE 11. scrolling works, but the editor dimming doesn't work. To be honest, I'm tempted to say that this is mergable, and I'll start on the editor dimming code in a new PR as I want to overhaul all of the UI styling a bit.