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
f1f87790
Commit
f1f87790
authored
May 15, 2015
by
duminil
Browse files
Reset polygon while drawing
parent
b89abe89
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/script/simstadt_openlayers.js
View file @
f1f87790
...
@@ -183,17 +183,19 @@ function displayInfo() {
...
@@ -183,17 +183,19 @@ function displayInfo() {
draw
.
on
(
'
drawend
'
,
function
(
e
)
{
draw
.
on
(
'
drawend
'
,
function
(
e
)
{
displayInfo
();
displayInfo
();
reset_btn
.
disabled
=
false
;
send_btn
.
disabled
=
false
;
send_btn
.
disabled
=
false
;
});
});
$
(
'
#reset
'
).
click
(
function
()
{
$
(
'
#reset
'
).
click
(
function
()
{
// TODO: Should also remove current drawing if polygon isn't finished
try
{
$
(
'
#dataPanel
'
).
empty
();
draw
.
finishDrawing
();
featureOverlay
.
getFeatures
().
clear
();
}
finally
{
intersections
.
clear
();
$
(
'
#dataPanel
'
).
empty
();
reset_btn
.
disabled
=
true
;
featureOverlay
.
getFeatures
().
clear
();
send_btn
.
disabled
=
true
;
intersections
.
clear
();
reset_btn
.
disabled
=
true
;
send_btn
.
disabled
=
true
;
}
});
});
$
(
'
#send
'
).
click
(
function
()
{
$
(
'
#send
'
).
click
(
function
()
{
...
...
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