Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
com.akaver.sportmap
SportMap-aurelia
Commits
7acb026e
Commit
7acb026e
authored
Apr 21, 2020
by
Andres Käver
Browse files
ui
parent
202da9a5
Pipeline
#792
passed with stages
in 1 minute and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/views/home/index.html
View file @
7acb026e
<template>
<div
id=
"map"
></div>
<div
class=
"form-group"
>
<label
for=
"sessionSelect"
>
Sessions
</label>
<select
value.bind=
"selectedGpsSession"
class=
"form-control"
id=
"sessionSelect"
>
...
...
@@ -10,4 +9,5 @@
</select>
</div>
<div
id=
"map"
></div>
</template>
src/views/home/index.ts
View file @
7acb026e
...
...
@@ -27,11 +27,12 @@ export class HomeIndex {
selectedGpsSession
:
IGpsSession
|
null
=
null
;
gpsLocations
:
IGpsLocation
[]
=
[];
viewportHeight
=
Math
.
max
(
document
.
documentElement
.
clientHeight
,
window
.
innerHeight
||
0
);
viewportWidth
=
Math
.
max
(
document
.
documentElement
.
clientWidth
,
window
.
innerWidth
||
0
);
constructor
(
private
gpsSessionService
:
GpsSessionService
,
private
gpsLocationService
:
GpsLocationService
)
{
}
...
...
@@ -46,6 +47,12 @@ export class HomeIndex {
attached
():
void
{
log
.
debug
(
"
attached
"
);
const
elem
=
document
.
querySelector
(
'
#map
'
);
if
(
elem
){
elem
.
setAttribute
(
'
style
'
,
'
height:
'
+
(
this
.
viewportHeight
*
.
8
).
toString
()
+
'
px;
'
);
}
this
.
map
=
L
.
map
(
'
map
'
).
setView
([
59.3953607
,
24.6643414
],
15
);
L
.
tileLayer
(
...
...
@@ -63,6 +70,7 @@ export class HomeIndex {
}
}
);
}
detached
():
void
{
...
...
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