Skip to content
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

fix scale/rotate/rotateScale distortions + tests #380

Merged
merged 10 commits into from Aug 13, 2019

Conversation

sashadev-sky
Copy link
Member

@sashadev-sky sashadev-sky commented Aug 11, 2019

Testing for #341, testing scale and exposing scaleBy API
Fixes #352

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with grunt
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updates
  • @mention the original creator of the issue in a comment below for help or for a review

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

====================
changes

  • below moved to L.DistortableImageOverlay:

    • scaleBy
    • rotateBy
    • _revert: remove distortions using project, remaining bug is img shifts position a little on the map. holding off to try to fix completely in smaller PR bc will involve changes to corner initialization.
  • Modes fixed:

    • scale: implement edgeminwidth, add tests, expose API
    • rotate: remove distortions using project
    • rotateScale: remove distortions using project, implement edgeminwidth
  • other API:

  • setCorner and setCorners exposed.

    • calls to overlay._reset, overlay.fire('update'), and overlay.editing._updateToolbarPos have all been put inside these methods for consistency - we no longer need to make these calls for each separate distortion.
      ====================

@sashadev-sky
Copy link
Member Author

building on #341, I am pretty sure this PR eradicates all distortions (scale, rotate, and rotateScale). I originally opened it to expose a scale API and add tests, but ending up fixing all the modes.
@rexagod @jywarren

@sashadev-sky sashadev-sky changed the title test scale fix scale/rotate/rotateScale distortions + tests Aug 12, 2019
Copy link
Member

@rexagod rexagod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@sashadev-sky
Copy link
Member Author

@rexagod I will bump to 0.7.0 and merge!

@jywarren
Copy link
Member

jywarren commented Aug 14, 2019 via email

sashadev-sky added a commit that referenced this pull request Sep 15, 2019
* test scale

* no more distortions

* improve revert

* refactor

* update docs

* move comment out of code into README

* clean tests

* clean

* clean

* refactor
themacboy pushed a commit to themacboy/Leaflet.DistortableImage that referenced this pull request Sep 19, 2019
* test scale

* no more distortions

* improve revert

* refactor

* update docs

* move comment out of code into README

* clean tests

* clean

* clean

* refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When I rotate the image many times, it deforms
3 participants