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
2905be5f
Commit
2905be5f
authored
1 year ago
by
Jakob Severin Steffensen Hjelseth
Browse files
Options
Downloads
Patches
Plain Diff
Legge til eventlistener for å vise filnavn
parent
42b3fab3
No related branches found
Branches containing commit
No related tags found
2 merge requests
!8
From dev into main
,
!7
Resolve "Gjøre drop av filer mulig"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
index.html
+2
-2
2 additions, 2 deletions
index.html
javascript/map.js
+1
-1
1 addition, 1 deletion
javascript/map.js
javascript/openFileFromExplorer.js
+10
-3
10 additions, 3 deletions
javascript/openFileFromExplorer.js
with
13 additions
and
6 deletions
index.html
+
2
−
2
View file @
2905be5f
...
...
@@ -48,8 +48,8 @@
</div>
<div
style=
"margin-top: 5px; margin-bottom: 5px;"
>
<input
type=
"file"
none=
"dialog"
id=
"dialog"
>
<button
id=
"clickOpen"
onclick=
"clickMe()"
>
Click here to open new layer
</button>
<input
type=
"file"
none=
"dialog"
id=
"dialog"
multiple
>
<button
id=
"clickOpen"
onclick=
"clickMe()"
>
Click here to open new layer
s
</button>
</div>
<div
style=
"margin-left: 10px; font-size: 18px; height: 60vh;"
>
...
...
This diff is collapsed.
Click to expand it.
javascript/map.js
+
1
−
1
View file @
2905be5f
...
...
@@ -29,7 +29,7 @@ L.control.zoom({
var
baselayers
=
{
"
OpenStreetMap
"
:
osm_map
,
"
Satellite
"
:
googleSat
}
;
}
L
.
control
.
layers
(
baselayers
).
addTo
(
map
)
...
...
This diff is collapsed.
Click to expand it.
javascript/openFileFromExplorer.js
+
10
−
3
View file @
2905be5f
const
clickOpen
=
document
.
getElementById
(
"
clickOpen
"
);
const
dialog
=
document
.
getElementById
(
"
dialog
"
);
const
clickOpen
=
document
.
getElementById
(
"
clickOpen
"
);
// Knappen vi gir funksjonalitet
const
dialog
=
document
.
getElementById
(
"
dialog
"
);
// Input-feltet vi har skjult, men som lagrer dataen som velges
function
clickMe
()
{
dialog
.
click
();
};
}
dialog
.
addEventListener
(
"
input
"
,
()
=>
{
if
(
dialog
.
files
.
length
)
{
let
text
=
dialog
.
files
[
0
].
name
;
document
.
getElementById
(
"
layers
"
).
innerHTML
=
text
;
}
});
\ 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