IngeniumGolf/map-drawings-js — pull request #4 by mdiin (2014-02-06 08:48:33+00:00)
Title: Make code more controllable for the caller

What
=

While using this project in the prototype code for the course guide app I have come across a couple of things that I had to modify to be able to integrate the map drawing code. I believe they are generally useful, so please have a look at them. :-)

Remove call to setup
-

To make the code more generally useful it should be up to the caller to initialise a canvas and paper.js scope. When the code does not call `setup` on the passed in canvas it gives the caller a lot more control over how to use the drawing provided by this library.

With this PR I have changed the code such that the caller must now activate the project and layers on which he wants the map to be drawn, before creating the `MapDrawing` object.

Improve zoom-to-fit
-

It now scales according to both height and width of the `MapDrawing`'s item, depending on which is the larger of the two. The effect is that the entire drawing is always visible.

What is missing
=

- Tests