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

Drawing areas fails if no priority block exists #361

Open
otbutz opened this issue Oct 25, 2023 · 1 comment
Open

Drawing areas fails if no priority block exists #361

otbutz opened this issue Oct 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@otbutz
Copy link
Contributor

otbutz commented Oct 25, 2023

Describe the bug

Drawing an area fails silently if no priority block is present in the custom model.

Console log
Uncaught TypeError: r.priority is undefined
    <anonymous> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    dispatchEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    finishDrawing http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleUpEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleMapBrowserEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    dispatchEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handlePointerUp_ http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    zd http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handlePointerDown_ http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    zd http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    Iy http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleTargetChanged_ http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    dispatchEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    notify http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    set http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    setTarget http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    _o http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    il http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    ku http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    wu http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    w http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    P http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    1196 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    2851 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    7799 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    3961 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    4470 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    <anonymous> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    <anonymous> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    <anonymous> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
bundle.c784ce2a89264a26b504.js:2:1348102
    <anonym> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    dispatchEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    finishDrawing http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleUpEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleMapBrowserEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    dispatchEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handlePointerUp_ http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    (Async: EventListener.handleEvent)
    zd http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handlePointerDown_ http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    (Async: EventListener.handleEvent)
    zd http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    Iy http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    handleTargetChanged_ http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    dispatchEvent http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    notify http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    set http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    setTarget http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    _o http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    il http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    ku http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    wu http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    w http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    P http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    (Async: EventHandlerNonNull)
    1196 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    2851 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    7799 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    3961 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    4470 http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    n http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    <anonym> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    <anonym> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2
    <anonym> http://localhost:8989/maps/bundle.c784ce2a89264a26b504.js:2

To Reproduce

Open the max speed example in the custom model editor and try to draw an area.

Expected behavior

Drawing an area should modify an existing priority block or create a new one if it doesn't exist yet.

@karussell
Copy link
Member

Yes, we should probably avoid adding the priority statement as @easbar suggested once. My idea was to add the "blocking statement" directly because this is what most users probably want, but we could show how an area is used in an example.

@karussell karussell added the bug Something isn't working label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants