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

setLatLngs on polygon after scaling does not update dashed resize box #26

Closed
gagecarto opened this issue Nov 17, 2017 · 4 comments
Closed
Assignees

Comments

@gagecarto
Copy link

gagecarto commented Nov 17, 2017

If I create a transformable polygon like

var printBoundary = L.polygon([...],{ transform:true }).addTo(map)

I can then drag its corners and the polygon resizes accordingly

If I then change the polygons lat/lngs using setLatLngs
printBoundary.setLatLngs([new lat lngs ])

The polygon will resize accordingly but the dashed transform box does not update (see below). Could I setLatLngs on the resize box to account for this?

resize

@w8r w8r self-assigned this Nov 17, 2017
@w8r
Copy link
Owner

w8r commented Nov 17, 2017

Well, I'm afraid the plugin has to be notified in order to take in the changes. I will take a look how to do it properly.

@jperelli
Copy link

For a similar issue I used

printBoundary.transform._updateHandlers()

@w8r
Copy link
Owner

w8r commented Apr 3, 2018

I should make it public

@w8r w8r closed this as completed in 8bca8d7 Apr 3, 2018
@artuska
Copy link

artuska commented Dec 13, 2019

Have the same issue. I have Leaflet.Editable and Leaflet.Transform both on my editable shape — when i drag shape vertex i want to refresh transform dashed box. How can i do this?

_updateHandlers() hack does not work.

w8r added a commit that referenced this issue Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants