Skip to content

Commit

Permalink
Add docs regarding updating the drawing options. Update TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtoye committed Feb 11, 2013
1 parent 2da6de5 commit 24e6903
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,20 @@ var drawControl = new L.Control.Draw({
});
````

### Changing a drawing handlers options

You can change a draw handlers options after initialization by using the `setDrawingOptions` method on the Leaflet.draw control.

E.g. to change the colour of the rectangle:

````js
drawControl.setDrawingOptions(
rectangle: {
color: '#0000FF'
}
);
````

<a name="thanks" />
## Thanks

Expand Down
6 changes: 4 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
* ~Custom build tool.~
* ~Move Poly.Edit.js~
* ~Add ability to update the options after control is initialized.~
* ~Make a git tag of Leaflet.draw 0.1~
* ~Document changing the options of a draw handler.~

### TODO

* Fix all the Show Code links in the ReadMe
* Make a git tag of Leaflet.draw 0.1
* Fix all the Show Code links in the ReadMe.
* Update the CHANGELOG with contributors for 0.2

0 comments on commit 24e6903

Please sign in to comment.