Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
3ab3caa8
Commit
3ab3caa8
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Possibly less broken
parent
1bf3ac9c
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+11
-14
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
11 additions
and
14 deletions
+11
-14
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
11
-
14
View file @
3ab3caa8
...
...
@@ -161,27 +161,25 @@ const regionChooser = (function(){
li
.
onmouseover
=
function
(){
regionChooser
.
highlightPolygon
(
this
.
feature
)
};
li
.
onmouseout
=
function
(){
regionChooser
.
resetHighlight
(
this
.
feature
)
};
/* li.setAttribute('onmouseover', 'regionChooser.highlightPolygon(' + id + ')"');
li.setAttribute('onmouseout', 'regionChooser.resetHighlight(' + id + ')"');
*/
let
checkbox
=
li
.
appendChild
(
document
.
createElement
(
'
input
'
));
let
checkbox
=
li
.
appendChild
(
document
.
createElement
(
'
input
'
));
checkbox
.
type
=
'
checkbox
'
checkbox
.
id
=
"
citygml_
"
+
feature
.
getId
();
checkbox
.
className
=
"
select_citygml
"
;
checkbox
.
feature
=
feature
;
checkbox
.
setAttribute
(
'
onclick
'
,
"
regionChooser.isDownloadPossible()
"
);
let
label
=
li
.
appendChild
(
document
.
createElement
(
'
label
'
));
label
.
setAttribute
(
'
for
'
,
"
citygml_
"
+
feature
.
getId
());
label
.
textContent
=
feature
.
name
;
checkbox
.
setAttribute
(
'
onclick
'
,
"
regionChooser.isDownloadPossible()
"
);
var
text
=
feature
.
name
;
/* var link = '<li onmouseover="regionChooser.highlightPolygon(' + id + ')" onmouseout="regionChooser.resetHighlight(' + id +')">';
link += '<input type="checkbox" id="citygml_' + feature.getId() + '" class="select_citygml" onclick="regionChooser.isDownloadPossible();">'
+ '<label for="citygml_' + feature.getId() + '">' + feature['name'] + '</label>';
link += " (" + citygml_percentage + "%";
text
+=
"
(
"
+
citygml_percentage
+
"
%
"
;
if
(
sketch_percentage
==
100
)
{
link
+= ", all inside";
text
+=
"
, all inside
"
;
}
*/
dataPanel
[
0
].
appendChild
(
li
);
label
.
textContent
=
text
+
"
)
\n
"
;
dataPanel
[
0
].
appendChild
(
li
);
}
publicScope
.
highlightPolygon
=
function
(
feature
)
{
...
...
@@ -204,7 +202,6 @@ const regionChooser = (function(){
//TODO: Dry
var
selectedFeatures
=
Array
.
from
(
document
.
querySelectorAll
(
"
input.select_citygml
"
)).
filter
(
c
=>
c
.
checked
).
map
(
c
=>
c
.
feature
);
console
.
log
(
selectedFeatures
);
selectedFeatures
.
forEach
(
f
=>
refreshStyle
(
f
,
"
selected
"
));
document
.
getElementById
(
"
download_region_button
"
).
disabled
=
(
selectedFeatures
.
length
==
0
);
...
...
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
Menu
Explore
Projects
Groups
Snippets