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

Adding a node while hovering over an area fill causes a stack trace #646

Closed
Bonkles opened this issue Nov 12, 2022 · 1 comment
Closed
Assignees
Milestone

Comments

@Bonkles
Copy link
Contributor

Bonkles commented Nov 12, 2022

While debugging the 'navigation' step of the walkthrough, I see we are now able to click the 'add point' button and click on a building interior fill. This is an improvement over before, where we simply weren't allowed to click on the fill (the click wasn't honored).

Now, though, the 'add node' mode thinks we're clicking ON THE WAY and so that we need to add a midpoint to the way- this is absolutely not the case.

Stack trace:

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'id')
    at <anonymous> (/Users/clarkben/working/RapiD/modules/actions/add_midpoint.js:10:54)
    at _act (/Users/clarkben/working/RapiD/modules/core/history.js:43:29)
    at _perform (/Users/clarkben/working/RapiD/modules/core/history.js:61:28)
    at perform (/Users/clarkben/working/RapiD/modules/core/history.js:220:24)
    at <anonymous> (/Users/clarkben/working/RapiD/modules/core/context.js:318:25)
    at _clickWay (/Users/clarkben/working/RapiD/modules/modes/ModeAddPoint.js:135:18)
    at _click (/Users/clarkben/working/RapiD/modules/modes/ModeAddPoint.js:107:14)
    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:202:33)
    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:545:14)
    at propagate (/Users/clarkben/working/RapiD/node_modules/@pixi/events/src/EventBoundary.ts:336:18)
    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)
@Bonkles Bonkles self-assigned this Nov 12, 2022
@Bonkles Bonkles added this to the v2 Alpha 3 milestone Nov 12, 2022
@Bonkles
Copy link
Contributor Author

Bonkles commented Nov 12, 2022

Fixed in 334140e524a1010b2bf49970eaeb844c211b8ca5. If a fill is being hovered, don't treat it like a snap and instead treat it like a click on an empty section of the map.

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

No branches or pull requests

1 participant