Commit 13f85aab authored by Eric Duminil's avatar Eric Duminil
Browse files

F5 for refresh

parent cc835fd7
Pipeline #6958 failed with stage
...@@ -285,12 +285,17 @@ var regionChooser = (function(){ ...@@ -285,12 +285,17 @@ var regionChooser = (function(){
draw.setActive(false); draw.setActive(false);
}); });
// Pressing ESCAPE or DELETE resets the drawing.
// With OpenLayers 3.9, draw_interaction.removeLastPoint(); might be better. // With OpenLayers 3.9, draw_interaction.removeLastPoint(); might be better.
document.addEventListener('keydown', function(e) { document.addEventListener('keydown', function(e) {
if (e.which == 27 || e.which == 46){ //NOTE: e.key isn't defined in JavaFX Browser
if (e.which == 27 || e.which == 46){ // ESCAPE or DELETE.
resetDrawing(); resetDrawing();
} }
if (e.which == 116 && fromJavaFX){ // F5 for refresh
dataPanel.prepend("<h2 class='ok'>Refreshing repository...</h2><br/>\n");
document.documentElement.className = 'wait';
fxapp.refreshHulls();
}
}); });
function resetDrawing(){ function resetDrawing(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment