Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Amazing project! Really enjoyed playing around with it just now - so easy to create a functional and great looking map. When you say pure javascript, did you use any frameworks or supporting libraries? If not then how did you organize the code (and do you do have any type of automated testing?)


Thanks! And nope, there's no frameworks or libraries in use, other than some helper modules I wrote for past projects and used in this. The code is mostly just organized as each tool being its own class, having a few common methods such as mouseDown, mouseMove, drawCursor and so on, with the main class passing off events from the user to whichever tool is selected. I forked this code off of a previous project, so parts of it are still a little messy due to me enjoying adding new features more than I enjoy refactoring code, but I tried to make it pretty modular from the beginning so it's easy to build on.

At the moment, there's no automated testing, I have a Patreon set up where a decent number of people are helping me beta test new features, but for the time being, I just do my best to avoid adding any regressions, and try to fix them quickly if they do show up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: