-
Notifications
You must be signed in to change notification settings - Fork 35
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
Epic street editing #989
Epic street editing #989
Conversation
accepts type and index; does not yet accept custom object to represent segment and its constituent components; doesn't appear to apply child components correctly -- instead look at working code to create new street-segments from an object in street-segment.js to test, run on console: > document.querySelector('[managed-street]').components['managed-street'].insertSegment(3, 'bike-lane');
Insert new segment
as a user i can detach a clone and the action is undo-able. if i save and reload I cannot undo or reattach the component unless i choose to add a new clone component or reset the segment completely.
Detach with multi command
allow ped and stencil detach
striping first cut
Co-Authored-By: Ben Kovitz <bkovitz@gmail.com>
Co-Authored-By: Ben Kovitz <bkovitz@gmail.com>
Co-Authored-By: Ben Kovitz <bkovitz@gmail.com>
…Managed-Street-format Converting default streets to managed street format
labels with manage-street event dispatcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using events is indeed better here. You can probably simplify the code just listening on segment-width-changed on the parent entity, the event bubbles from the segment to the parent that is the managed-street entity.
Be careful to properly bind the listener function and use the same function when you remove the listener.
fix binding I have to keep this in or it raises an error `Cannot read properties of undefined (reading 'width')`. My guess is there is a race condition such that when the scene is loaded the dom attribute is added but the a-frame component hasn't been initialized thus the segment is returned as matching the querySelector but not from a-frame getattribute? I changed the logic a bit to check if the street-segment component exist and to also return if no width for a segment: ``` const segmentWidth = segmentEl.getAttribute('street-segment')?.width; if (!segmentWidth) return; ```
remove old streetplan loader
Streetplan to managed street
No description provided.