-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(edited) Publish changes compatible with downstream React wrapper #105
Comments
Hi, Chris - wow, very exciting! 🎉 Of course go ahead -- I'm interested though in if you think any of your changes would be usefully submitted upstream to merge back into this library. Where is the modified copy you're working from -- is it this one? Is that the compiled version from this repo's Thanks for getting in touch! |
Great! Thanks a lot. I'll publish it sometime this week and close the issue.
Yep thats the one. The diff won't be very exciting I'm afraid. I had to chop out the toolbar to get it compiling so it's step backwards for the upstream. Not sure why but I just couldn't get it to play nicely with react. One difference that you may or may not find useful is I split the rotate and scale into seperate actions. It fit my use case a little better than doing them together and it accidentally fixed that distortion problem noted in #85. |
Hi, Chris - I'd like to consider integrating your downstream changes with an options flag so that we retain the same upstream code, and things like the distortion bug you were really helpful on are easier to resolve across both uses of the codebase. Do you think the no-toolbar variant would be possible to set via an options flag? We could even create a grunt task to compile a non-toolbar version alongside the original in the /dist/ code. Just looking for ways to organize things so that we can help one another out on debugging and such moving forward! The split of rotate and scale, maybe we could actually offer all three and have the separation settable via an options param. Cool! |
(renamed accordingly, didn't seem worth opening a new issue) |
Using grunt to conditionally compile is a terrific idea. I wasn't looking forward to to manually updating my copy and it'll mean any new features I had in mind can be made here instead of downstream. |
Awesome. Do you want to try opening a PR with your version of the |
I'm happy to pitch in here too, thanks! |
I'd like to take the next step here, so let's try to identify the sections of code that were changed, more discretely:
Here is the full diff; it's not too complex: https://gist.github.com/jywarren/59f0cb0baec03bee99540ac2af2ecf70/revisions?diff=split#diff-d592453497ece2dffbf1a19cb06db126 We can actually preserve "scale + rotate" as well as separate "scale" and "rotate" tools, so both are usable in different UIs. Suppressing the toolbarWe can, separately, disable the whole
Here's an example of using a constructor parameter:
And/or on this line where we instantiate the toolbar where we can put a conditional:
Then @ChrisLowe-Takor will be able to simply run |
Moved the second part to a stand-alone issue in #111 ! Next we can break out the "create new separate scale/rotate tools" as well. |
Hi, I also documented how we can do the rotate/scale work, which looks a little more involve but not too bad: #112 |
Hi @ChrisLowe-Takor ! Thanks to fantastic contributions by several new contributors and especially @rexagod, I've opened a PR which I believe will start in that direction, although some integration code may be needed to set the defaults etc: |
Hi,
Terrific mapping library guys. I was wondering if the maintainers and contributors would mind if I publish a react wrapper for this. Here is the repo: https://github.com/ChrisLowe-Takor/react-leaflet-distortable-imageoverlay
It's not strictly a wrapper as I had to chop and change quiet a bit to get all the functionality online (had some major problems with the Toolbar and Translating for one thing). It uses a combination of my own implementations, Leaflet.Path.Transform and modified copy of the Leaflet.DistortableImage distribution.
Would appreciate your permission and will be happy to chip in with some contributions from time to time.
The text was updated successfully, but these errors were encountered: