Open woodpav opened 6 years ago
I have a same problem.
Can't believe we still have this issue from 2018...
A temporary solution is to enable controls and then hide it in css...
.mapboxgl-control-container {
display: none;
}
Just for added observation, I think this is more to do with which control is enabled than just if keyBindings is false. For a delete vertex to work the trash control must be enabled (which means it is visible of course under regular circumstances). If the displayControlsDefault and keyBindings are both true the trash control value determines if a delete key will work.
This snapshot demos my observation. Just change the value of trashActive to show that without it enabled you cannot delete even though the displayControlsDefault and keyBindings are active: https://jsbin.com/kocijekexo/1/edit?html,output
As @ShadowSonata explains, the solution to not show a control but still get the behaviour is to provide some css to hide the specific control icon or the whole control container.
mapbox-gl-js: 0.47.0 mapbox-gl-draw: 1.0.9
Steps:
1) Draw a polygon with your mouse 2) Click one of the polygon's coordinates and select it 3) Hit delete on your keyboard.
Expected:
The coordinate deletes and the polygon changes shape.
Actual:
The coordinate only deletes if
displayControlsDefault: true
.Demo:
Try switching
bugActive
:https://jsbin.com/gidotifaxa/1/edit?html,output