Public Lab
Add a #replaceTool method
Problem
We already have methods #addTool
, #removeTool
and #hasTool
for the L.DistortableImage.Edit
class:
We would like a #replaceTool
method now. It should take in 2 tools: the 1st gets removed from the toolbar, the 2nd takes its place.
Solution
You can use the other methods mentioned above for reference.
Part 1:
- add a
#replaceTool
method - document it in the README (just follow the current documentation pattern - see other tool related methods documented for reference)
- add a test for it - test that it adds the tool in the same index position as the old tool, not to the end of the array
- bump the package 1 minor version "x" given "0.0.x" so we can pull the new version into our MapKnitter repository, which uses this library for some of its core functionality, and use this function!
Additional Information
Please find further information on installation, solving, & getting help on the linked issue.
Thank you 😊
Task tags
Students who completed this task
NotDeGhost