Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProgGis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Severin Steffensen Hjelseth
ProgGis
Commits
f52845b3
Commit
f52845b3
authored
1 year ago
by
Jakob Severin Steffensen Hjelseth
Browse files
Options
Downloads
Patches
Plain Diff
Få på plass ny knapp med boks og valg av lag
parent
566da594
No related branches found
Branches containing commit
No related tags found
2 merge requests
!73
Dev
,
!72
Resolve "Egnethetsanalyse / prioritering"
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
css/style.css
+1
-1
1 addition, 1 deletion
css/style.css
index.html
+29
-1
29 additions, 1 deletion
index.html
javascript/sidebar&boxes.js
+5
-0
5 additions, 0 deletions
javascript/sidebar&boxes.js
javascript/suitability.js
+28
-0
28 additions, 0 deletions
javascript/suitability.js
with
63 additions
and
2 deletions
css/style.css
+
1
−
1
View file @
f52845b3
...
...
@@ -31,7 +31,7 @@ p {
.box1
{
display
:
flex
;
flex-grow
:
7
;
flex-grow
:
8
;
flex-direction
:
row
;
}
...
...
This diff is collapsed.
Click to expand it.
index.html
+
29
−
1
View file @
f52845b3
...
...
@@ -28,12 +28,13 @@
<div
style=
"display: flex; flex-grow: 2; flex-direction: column;"
>
<h1
style=
"margin: 0; padding: 0; text-align: center; font-size: 12vh;"
>
ProgGIS
</h1>
<div
id=
"buttons1"
class=
"box1"
>
<p
style=
"width:
7
vw;"
></p>
<p
style=
"width:
1
vw;"
></p>
<button
class=
"button"
onclick=
"openBox('bufferBox')"
>
Buffer
</button>
<button
class=
"button"
onclick=
"openBox('differenceBox')"
>
Difference
</button>
<button
class=
"button"
onclick=
"openBox('dissolveBox')"
>
Dissolve
</button>
<button
class=
"button"
onclick=
"openBox('extractBox')"
>
Extract
</button>
<button
class=
"button"
onclick=
"openBox('intersectionBox')"
>
Intersection
</button>
<button
class=
"button"
onclick=
"openBox('suitabilityBox')"
>
Suitability
</button>
<button
class=
"button"
onclick=
"openBox('unionBox')"
>
Union
</button>
</div>
<div
id=
"buttons2"
class=
"box2"
style=
"display: none;"
>
...
...
@@ -193,6 +194,32 @@
<button
class=
"button"
style=
"font-size: 25px;"
onclick=
"makeIntersection()"
>
Intersect
</button>
</div>
<div
id=
"suitabilityBox"
class=
"box"
>
<div
class=
"box3"
>
<h1
style=
"font-size: 4vh; text-align: center; width: 36vw;"
>
Suitability
</h1>
<svg
style=
"cursor: pointer; padding-top: 15px;"
onclick=
"closeBox('suitabilityBox')"
xmlns=
"http://www.w3.org/2000/svg"
width=
"3vw"
height=
"3vw"
fill=
"currentColor"
class=
"bi bi-x-circle-fill"
viewBox=
"0 0 16 16"
>
<path
d=
"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"
/>
</svg>
</div>
<p>
Choose map layers in prioritised order:
</p>
<div
id=
"priorityDiv"
>
<div
style=
"display: flex; justify-content: center;"
>
<select
id=
"priority1"
></select>
<svg
onclick=
"addPrioritizedLayer()"
style=
"cursor: pointer; margin-left: 1vw;"
xmlns=
"http://www.w3.org/2000/svg"
width=
"3vh"
height=
"3vh"
fill=
"currentColor"
class=
"bi bi-plus-circle-fill"
viewBox=
"0 0 16 16"
>
<path
d=
"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"
/>
</svg>
</div>
</div>
<p>
Hei 8)
</p>
</div>
<div
id=
"unionBox"
class=
"box"
>
<div
class=
"box3"
>
<h1
style=
"font-size: 4vh; text-align: center; width: 36vw;"
>
Union
</h1>
...
...
@@ -291,6 +318,7 @@
<script
src=
"javascript/intersect.js"
></script>
<script
src=
"javascript/union.js"
></script>
<script
src=
"javascript/extract.js"
></script>
<script
src=
"javascript/suitability.js"
></script>
<!-- Map change -->
...
...
This diff is collapsed.
Click to expand it.
javascript/sidebar&boxes.js
+
5
−
0
View file @
f52845b3
...
...
@@ -36,6 +36,11 @@ function openBox(id) { // Åpner aktuell boks (id)
fillSelect
(
"
extractSelect
"
);
}
else
if
(
id
==
"
intersectionBox
"
)
{
fillDoubleSelect
(
"
intersectionSelect
"
);
}
else
if
(
id
==
"
suitabilityBox
"
)
{
var
numb
=
document
.
getElementById
(
"
priorityDiv
"
).
childElementCount
;
for
(
var
i
=
1
;
i
<=
numb
;
i
++
)
{
fillSelect
(
"
priority
"
+
i
.
toString
());
}
}
else
if
(
id
==
"
unionBox
"
)
{
fillDoubleSelect
(
"
unionSelect
"
);
}
...
...
This diff is collapsed.
Click to expand it.
javascript/suitability.js
0 → 100644
+
28
−
0
View file @
f52845b3
function
addPrioritizedLayer
()
{
var
newPriority
=
document
.
createElement
(
"
div
"
);
var
numb
=
document
.
getElementById
(
"
priorityDiv
"
).
childElementCount
+
1
;
var
start
=
`<div id="div
${
numb
}
" style="display: flex; flex-grow: 2; flex-direction: row; justify-content: center; margin-top: 1vh;">`
;
var
newSelect
=
`<select id="priority
${
numb
.
toString
()}
"></select>`
;
var
newButton
=
`<svg onclick="removePrioritizedLayer(
${
numb
}
)" style="cursor: pointer; margin-left: 1vw;" xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-trash3-fill" viewBox="0 0 16 16"> <path d="M11 1.5v1h3.5a.5.5 0 0 1 0 1h-.538l-.853 10.66A2 2 0 0 1 11.115 16h-6.23a2 2 0 0 1-1.994-1.84L2.038 3.5H1.5a.5.5 0 0 1 0-1H5v-1A1.5 1.5 0 0 1 6.5 0h3A1.5 1.5 0 0 1 11 1.5m-5 0v1h4v-1a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5M4.5 5.029l.5 8.5a.5.5 0 1 0 .998-.06l-.5-8.5a.5.5 0 1 0-.998.06Zm6.53-.528a.5.5 0 0 0-.528.47l-.5 8.5a.5.5 0 0 0 .998.058l.5-8.5a.5.5 0 0 0-.47-.528ZM8 4.5a.5.5 0 0 0-.5.5v8.5a.5.5 0 0 0 1 0V5a.5.5 0 0 0-.5-.5"/> </svg>`
;
var
end
=
'
</div>
'
newPriority
.
innerHTML
=
start
+
newSelect
+
newButton
+
end
;
document
.
getElementById
(
"
priorityDiv
"
).
appendChild
(
newPriority
);
fillSelect
(
"
priority
"
+
numb
.
toString
());
}
function
removePrioritizedLayer
(
numb
)
{
var
count
=
document
.
getElementById
(
"
priorityDiv
"
).
childElementCount
;
if
(
numb
==
count
)
{
document
.
getElementById
(
"
priorityDiv
"
).
removeChild
(
document
.
getElementById
(
"
div
"
+
numb
.
toString
()).
parentElement
);
}
else
{
for
(
var
i
=
numb
;
i
<
count
;
i
++
)
{
document
.
getElementById
(
"
priority
"
+
i
.
toString
()).
value
=
document
.
getElementById
(
"
priority
"
+
(
i
+
1
).
toString
()).
value
;
}
document
.
getElementById
(
"
priorityDiv
"
).
removeChild
(
document
.
getElementById
(
"
div
"
+
count
.
toString
()).
parentElement
);
}
}
function
suitability
()
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment