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
28a02297
Commit
28a02297
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Select All or None.
parent
51841bfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/resources/eu/simstadt/regionchooser/website/index.html
+1
-1
...in/resources/eu/simstadt/regionchooser/website/index.html
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+8
-3
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
9 additions
and
4 deletions
+9
-4
src/main/resources/eu/simstadt/regionchooser/website/index.html
+
1
-
1
View file @
28a02297
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<div
id=
"header"
>
<div
id=
"header"
>
<ul>
<ul>
<li
class=
"title"
>
Simstadt Region Chooser
</li>
<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>
</ul>
</div>
</div>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
<div
id=
"map"
class=
"map"
tabindex=
"0"
></div>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
8
-
3
View file @
28a02297
...
@@ -10,6 +10,7 @@ var regionChooser = (function(){
...
@@ -10,6 +10,7 @@ var regionChooser = (function(){
//NOTE: Only called from JavaFX. At startup, or when Repo has been changed.
//NOTE: Only called from JavaFX. At startup, or when Repo has been changed.
gmlId
=
0
;
gmlId
=
0
;
kml_source
.
clear
();
kml_source
.
clear
();
document
.
getElementById
(
"
select_repository
"
).
style
.
visibility
=
"
visible
"
;
}
}
if
(
fromJavaFX
){
if
(
fromJavaFX
){
...
@@ -290,10 +291,10 @@ var regionChooser = (function(){
...
@@ -290,10 +291,10 @@ var regionChooser = (function(){
dataPanel
.
append
(
wgs84_coords
+
"
<br/>
\n
"
);
dataPanel
.
append
(
wgs84_coords
+
"
<br/>
\n
"
);
}
}
dataPanel
.
append
(
"
<h3 class='clean'>Area :
"
+
(
area
/
10000
).
toFixed
(
1
)
+
"
ha
\n
"
);
dataPanel
.
append
(
"
<h3 class='clean'>Area :
"
+
(
area
/
10000
).
toFixed
(
1
)
+
"
ha
\n
"
);
//TODO: Add selectAll
//TODO: Add selectNone
//TODO: Hide button if empty
//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
'
);
dataPanel
.
append
(
'
<br/>
\n
'
);
findIntersections
();
findIntersections
();
}
}
...
@@ -387,6 +388,10 @@ var regionChooser = (function(){
...
@@ -387,6 +388,10 @@ var regionChooser = (function(){
}
}
}
}
publicScope
.
checkCityGMLS
=
function
(
allOrNone
)
{
document
.
querySelectorAll
(
"
input.select_citygml
"
).
forEach
(
c
=>
c
.
checked
=
allOrNone
);
}
publicScope
.
selectRepository
=
function
()
{
publicScope
.
selectRepository
=
function
()
{
console
.
log
(
"
Should probably do select repository.
"
);
console
.
log
(
"
Should probably do select repository.
"
);
fxapp
.
selectRepository
();
fxapp
.
selectRepository
();
...
...
This diff is collapsed.
Click to expand it.
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