<commit_before>Leaflet.DistortableImageOverlay
===================

A Leaflet extension to distort images -- "rubbersheeting" -- mainly for the [MapKnitter.org](http://mapknitter.org) ([src](https://github.com/publiclab/mapknitter)) image georectification service by [Public Lab](http://publiclab.org).

Download as zip or clone to get a copy of the Repo.

To test the code, open index.html in your browser and click and drag the markers on the edges of the image. The image will show perspectival distortions.

A copy is also running at https://publiclab.github.io/ImageDistortLeaflet

This plugin is not yet complete!

****

##Setup

1. From the root directory, run `npm install` or `sudo npm install`
2. Open examples/index.html in a browser

##Contributing

1. This project uses `grunt` to do a lot of things, including concatenate source files from /src/ to /DistortableImageOverlay.js. But you may need to install grunt-cli: `npm install -g grunt-cli` first.
2. Run `grunt` in the root directory, and it will watch for changes and concatenate them on the fly.

****

##To do:

* map.on('click') should deselect all images, but is unfort. triggered even when you click directly on an image
* fix image ordering -- bringToFront() kinda janky? check event sequence
* figure out what `_bounds` is for and if we really need to update it
* ensure it's easy to attach event callback to 'deselect' for saving
  * and/or mouseup?
* fix/separate transparency and outlining
* create/document easy properties so we can send a concise description of an image to MapKnitter in JSON: locked, four corners in lat/lng, last touched/edited, uniq id or name of editor? (this belongs in mapknitter, not here), layer order
* there are some Chrome/Firefox bugs on Android<commit_msg>fixed demo link in README<commit_after>Leaflet.DistortableImageOverlay
===================

A Leaflet extension to distort images -- "rubbersheeting" -- mainly for the [MapKnitter.org](http://mapknitter.org) ([src](https://github.com/publiclab/mapknitter)) image georectification service by [Public Lab](http://publiclab.org).

Download as zip or clone to get a copy of the Repo.

To test the code, open index.html in your browser and click and drag the markers on the edges of the image. The image will show perspectival distortions.

A copy is also running at https://publiclab.github.io/ImageDistortLeaflet/examples/

This plugin is not yet complete!

****

##Setup

1. From the root directory, run `npm install` or `sudo npm install`
2. Open examples/index.html in a browser

##Contributing

1. This project uses `grunt` to do a lot of things, including concatenate source files from /src/ to /DistortableImageOverlay.js. But you may need to install grunt-cli: `npm install -g grunt-cli` first.
2. Run `grunt` in the root directory, and it will watch for changes and concatenate them on the fly.

****

##To do:

* map.on('click') should deselect all images, but is unfort. triggered even when you click directly on an image
* fix image ordering -- bringToFront() kinda janky? check event sequence
* figure out what `_bounds` is for and if we really need to update it
* ensure it's easy to attach event callback to 'deselect' for saving
  * and/or mouseup?
* fix/separate transparency and outlining
* create/document easy properties so we can send a concise description of an image to MapKnitter in JSON: locked, four corners in lat/lng, last touched/edited, uniq id or name of editor? (this belongs in mapknitter, not here), layer order
* there are some Chrome/Firefox bugs on Android
{'fraction_non_alphanumeric': 0.08886389201349831, 'fraction_numerical': 0.0022497187851518562, 'mean_word_length': 4.3975720789074355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7159303', 'n_tokens_mistral': 1024, 'n_tokens_neox': 984, 'n_words': 493}