Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
13f85aab
Commit
13f85aab
authored
Oct 12, 2022
by
Eric Duminil
Browse files
F5 for refresh
parent
cc835fd7
Pipeline
#6958
failed with stage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
13f85aab
...
...
@@ -285,12 +285,17 @@ var regionChooser = (function(){
draw
.
setActive
(
false
);
});
// Pressing ESCAPE or DELETE resets the drawing.
// With OpenLayers 3.9, draw_interaction.removeLastPoint(); might be better.
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
();
}
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
(){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment