-
Notifications
You must be signed in to change notification settings - Fork 75
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
Consistent meaning of annotation events across annotation types #623
Comments
@manthey thoughts? |
I see @kotfic's point, but I'm not completely convinced things should be changed. Our choice is:
I'm leaning toward making all annotations have a create state. |
@manthey this is your barbecue. I will say, as a user of the API, I am actually less interested in the state of the annotation per-say and more interested in getting consistent events that I can hook into. I am especially interested in events that allow me to dynamically modify annotations attributes before the annotation is actually rendered. |
OpenGeoscience/geojs#623 was resolved and #51 implicitly upgraded our version to incorporate the new interface. As a result, trying to make a rectangle annotation threw a "JSONRPCError (-32000): list index out of range".
This code path leads to inconsistent behavior for rectangle and point/polygon
geo.event.annotation.add
andgeo.event.annotation.state
events. Point and polygon objects will trigger an add onlayer.mode(...)
before any coordinates have been set. This information only becomes available for points and polygons in the state event. Rectangles on the other hand provide coordinate information in the add event, and do not fire the state event at all.The text was updated successfully, but these errors were encountered: