-
Notifications
You must be signed in to change notification settings - Fork 210
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
remove image from sidebar if deleted from image popup toolbar #146
Comments
I noticed this; I think it wouldn't be a tough fix but we have a bit of a long list at the moment :-( I'm hoping we can recruit more contributors soon; please pass on the word if you know any developers looking to help out on an open source project! |
2 issues; we should show an error when you're not logged in (covered in #118) and want to delete, and should remove image from sidebar if deleted from image popup toolbar. |
This is actually a bit more complex; the 'delete' listener we're using is fired after the image is deleted from the client-side Leaflet environment. I just wrote code that "confirms" with a popup, sends a "delete" command to the server, and then removes the image from the sidebar, but by the time that fires, it's already been removed from the local instance -- though it'll show up again if the page is reloaded. We have to override the native "delete" behavior of Leaflet.DistortableImage to not actually delete, but to defer to the handler we've provided for the "delete" event. |
OK, this is partially complete in my local branch; now we need to ensure that the uploader adds a "warpable-#" id to newly uploaded images' sidebar elements, so this works for newly uploaded images too. |
More on this behaviour: |
on right side panel when trying to delete an image i was redirected to a new page that doesn't exist
when i delete it from the floating editing panel when the image is selected it no longer appears on the map but it is still there
The text was updated successfully, but these errors were encountered: