Okay, it turned out for me that this PR is already closed :D Maybe this could still be merged independently or the changes could be merged with #27.
Most of the changes comes from #26 so I would merge that first. But this new feature really looks cool, it is like our competitor :D
I would give the id compass
to the compass img
itself so only the compass graphic would rotate. But then this line should look like this to keep the default translate of the image:
For semantical reasons I would use div
instead of span
because span
is intended to be an inline element, however this a block element here.
This semantically belongs to reset
(after line 334) and resetRound
(after line 360). Yes it will be some ugly code duplication but easier to find there and I plan to refactor this JS in the future.