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

Area Drawing has issues using way segments to start or finish the area shape. #718

Closed
Bonkles opened this issue Dec 13, 2022 · 1 comment
Assignees
Milestone

Comments

@Bonkles
Copy link
Contributor

Bonkles commented Dec 13, 2022

If you start an area drawing gesture by clicking on an existing way segment, it SHOULD stitch a new node to the segment and then show you the polygon drawn from that new node to the mouse pointer. Instead, you get a single new node and a stack trace.

area_draw_from_way_segment_doesnt_work.mov

Stack trace is generated as soon as the user clicks to add the second vertex to the area:

Uncaught TypeError TypeError: Cannot read properties of null (reading 'id')
    at _clickLoc (/Users/clarkben/working/RapiD/modules/modes/ModeDrawArea.js:264:52)
    at _click (/Users/clarkben/working/RapiD/modules/modes/ModeDrawArea.js:226:10)
    at emit (/Users/clarkben/working/RapiD/node_modules/eventemitter3/index.js:181:35)
    at _doClick (/Users/clarkben/working/RapiD/modules/behaviors/BehaviorDraw.js:303:10)
    at _pointerup (/Users/clarkben/working/RapiD/modules/behaviors/BehaviorDraw.js:213:12)
    at emit (/Users/clarkben/working/RapiD/node_modules/eventemitter3/index.js:181:35)
    at _pointerup (/Users/clarkben/working/RapiD/modules/pixi/PixiEvents.js:242:10)
    at notifyListeners (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:1313:26)
    at notifyTarget (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:549:18)
    at propagate (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:325:14)
    at dispatchEvent (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:240:14)
    at mapPointerUp (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:830:14)
    at mapEvent (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:261:28)
    at onPointerUp (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventSystem.ts:290:31)
_clickLoc @ /Users/clarkben/working/RapiD/modules/modes/ModeDrawArea.js:264:52
@Bonkles Bonkles added this to the v2 Alpha 3 milestone Dec 13, 2022
@Bonkles Bonkles self-assigned this Dec 13, 2022
Bonkles added a commit that referenced this issue Dec 13, 2022
… add nodes *after* the first one has been added.
@Bonkles
Copy link
Contributor Author

Bonkles commented Dec 13, 2022

Fixed in bd437d95c.

Here's a preview of the now-working functionality:

area_drawing_with_way_segments_works.mov

@Bonkles Bonkles closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending Release
Development

No branches or pull requests

1 participant