Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
28a02297
Commit
28a02297
authored
Oct 05, 2022
by
Eric Duminil
Browse files
Select All or None.
parent
51841bfb
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/index.html
View file @
28a02297
...
...
@@ -25,7 +25,7 @@
<div
id=
"header"
>
<ul>
<li
class=
"title"
>
Simstadt Region Chooser
</li>
<li
class=
"title"
id=
"repository"
><button
onclick=
"regionChooser.selectRepository()"
>
Select repository
</button></li>
<li
class=
"title"
id=
"
select_
repository"
style=
"visibility:hidden"
><button
onclick=
"regionChooser.selectRepository()"
>
Select repository
</button></li>
</ul>
</div>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
...
...
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
28a02297
...
...
@@ -10,6 +10,7 @@ var regionChooser = (function(){
//NOTE: Only called from JavaFX. At startup, or when Repo has been changed.
gmlId
=
0
;
kml_source
.
clear
();
document
.
getElementById
(
"
select_repository
"
).
style
.
visibility
=
"
visible
"
;
}
if
(
fromJavaFX
){
...
...
@@ -290,10 +291,10 @@ var regionChooser = (function(){
dataPanel
.
append
(
wgs84_coords
+
"
<br/>
\n
"
);
}
dataPanel
.
append
(
"
<h3 class='clean'>Area :
"
+
(
area
/
10000
).
toFixed
(
1
)
+
"
ha
\n
"
);
//TODO: Add selectAll
//TODO: Add selectNone
//TODO: Hide button if empty
dataPanel
.
append
(
'
<button type="button" onclick="regionChooser.downloadFromSelectedCityGMLs()" id="download" style="visibility:hidden">Download Region</button>
'
);
dataPanel
.
append
(
'
<button type="button" onclick="regionChooser.downloadFromSelectedCityGMLs()" id="download" style="visibility:hidden">Download Region</button><br/>
\n
'
);
dataPanel
.
append
(
'
<a href="#" onclick="regionChooser.checkCityGMLS(true);">(Select All)</a>
'
);
dataPanel
.
append
(
'
<a href="#" onclick="regionChooser.checkCityGMLS(false);">(Select None)</a>
'
);
dataPanel
.
append
(
'
<br/>
\n
'
);
findIntersections
();
}
...
...
@@ -387,6 +388,10 @@ var regionChooser = (function(){
}
}
publicScope
.
checkCityGMLS
=
function
(
allOrNone
)
{
document
.
querySelectorAll
(
"
input.select_citygml
"
).
forEach
(
c
=>
c
.
checked
=
allOrNone
);
}
publicScope
.
selectRepository
=
function
()
{
console
.
log
(
"
Should probably do select repository.
"
);
fxapp
.
selectRepository
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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