Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lam-station-visualization
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
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
data-analysis-and-ai
lam-station-visualization
Commits
9af72445
Commit
9af72445
authored
6 years ago
by
Janne Alatalo
Browse files
Options
Downloads
Patches
Plain Diff
Change hacky css to flexbox
I have no idea what I'm doing... It seems to work and scales better.
parent
a7ff7cd4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PointMap.js
+82
-44
82 additions, 44 deletions
src/PointMap.js
with
82 additions
and
44 deletions
src/PointMap.js
+
82
−
44
View file @
9af72445
...
@@ -158,12 +158,20 @@ class PointMap extends Component {
...
@@ -158,12 +158,20 @@ class PointMap extends Component {
getColorInfo
(
color_spectrum
,
undef_color
)
{
getColorInfo
(
color_spectrum
,
undef_color
)
{
const
gradient_str
=
color_spectrum
.
join
(
"
,
"
);
const
gradient_str
=
color_spectrum
.
join
(
"
,
"
);
const
styles
=
{
const
styles
=
{
container
:
{
flex_
container
:
{
position
:
"
absolute
"
,
position
:
"
absolute
"
,
zIndex
:
10
,
width
:
"
10
0%
"
,
left
:
"
90%
"
,
display
:
"
flex
"
,
top
:
0
,
top
:
0
,
marginTop
:
"
10px
"
justifyContent
:
"
flex-end
"
,
zIndex
:
10
,
pointerEvents
:
"
none
"
,
},
container
:
{
paddingTop
:
"
10px
"
,
paddingRight
:
"
50px
"
,
pointerEvents
:
"
auto
"
,
zIndex
:
10
,
},
},
gradient
:
{
gradient
:
{
backgroundImage
:
`linear-gradient(
${
gradient_str
}
)`
,
backgroundImage
:
`linear-gradient(
${
gradient_str
}
)`
,
...
@@ -187,25 +195,27 @@ class PointMap extends Component {
...
@@ -187,25 +195,27 @@ class PointMap extends Component {
},
},
};
};
return
(
return
(
<
div
style
=
{
styles
.
container
}
>
<
div
style
=
{
styles
.
flex_container
}
>
<
div
style
=
{
styles
.
side_by_side
}
>
<
div
style
=
{
styles
.
container
}
>
<
div
style
=
{
styles
.
gradient
}
/
>
<
div
style
=
{
styles
.
side_by_side
}
>
<
div
style
=
{
styles
.
caption_container
}
>
<
div
style
=
{
styles
.
gradient
}
/
>
<
Typography
variant
=
"
caption
"
>
<
div
style
=
{
styles
.
caption_container
}
>
Normal
traffic
<
Typography
variant
=
"
caption
"
>
<
/Typography
>
Normal
traffic
<
span
><
/span
>
<
/Typography
>
<
Typography
variant
=
"
caption
"
>
<
span
><
/span
>
Congested
traffic
<
Typography
variant
=
"
caption
"
>
<
/Typography
>
Congested
traffic
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{
styles
.
side_by_side
}
>
<
div
style
=
{
styles
.
side_by_side
}
>
<
div
style
=
{
styles
.
undef
}
/
>
<
div
style
=
{
styles
.
undef
}
/
>
<
div
style
=
{
styles
.
caption_container
}
>
<
div
style
=
{
styles
.
caption_container
}
>
<
Typography
variant
=
"
caption
"
>
<
Typography
variant
=
"
caption
"
>
Missing
info
Missing
info
<
/Typography
>
<
/
Typography
>
<
/
div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -214,44 +224,72 @@ class PointMap extends Component {
...
@@ -214,44 +224,72 @@ class PointMap extends Component {
getTips
()
{
getTips
()
{
const
styles
=
{
const
styles
=
{
container
:
{
column_flex_
container
:
{
position
:
"
absolute
"
,
position
:
"
absolute
"
,
top
:
0
,
height
:
"
100%
"
,
width
:
"
100%
"
,
display
:
"
flex
"
,
justifyContent
:
"
flex-end
"
,
flexDirection
:
"
column
"
,
zIndex
:
10
,
zIndex
:
10
,
left
:
"
75%
"
,
pointerEvents
:
"
none
"
,
top
:
"
90%
"
,
},
row_flex_container
:
{
display
:
"
flex
"
,
justifyContent
:
"
flex-end
"
,
},
container
:
{
paddingRight
:
"
50px
"
,
paddingBottom
:
"
10px
"
,
pointerEvents
:
"
auto
"
,
},
},
};
};
return
(
return
(
<
div
style
=
{
styles
.
container
}
>
<
div
style
=
{
styles
.
column_flex_container
}
>
<
Typography
variant
=
"
subheading
"
color
=
"
textSecondary
"
>
<
div
style
=
{
styles
.
row_flex_container
}
>
Scroll
Wheel
=
Zoom
In
Out
<
div
style
=
{
styles
.
container
}
>
<
/Typography
>
<
Typography
variant
=
"
subheading
"
color
=
"
textSecondary
"
>
<
Typography
variant
=
"
subheading
"
color
=
"
textSecondary
"
>
Scroll
Wheel
=
Zoom
In
Out
Mouse
Left
Click
+
Drag
=
Move
Map
<
/Typography
>
<
/Typography
>
<
Typography
variant
=
"
subheading
"
color
=
"
textSecondary
"
>
<
Typography
variant
=
"
subheading
"
color
=
"
textSecondary
"
>
Mouse
Left
Click
+
Drag
=
Move
Map
Ctrl
+
Mouse
Left
Click
+
Drag
=
Rotate
/
Tilt
map
<
/Typography
>
<
/Typography
>
<
Typography
variant
=
"
subheading
"
color
=
"
textSecondary
"
>
Ctrl
+
Mouse
Left
Click
+
Drag
=
Rotate
/
Tilt
map
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
}
}
getMoreInfoLink
()
{
getMoreInfoLink
()
{
const
styles
=
{
const
styles
=
{
container
:
{
flex_
container
:
{
position
:
"
absolute
"
,
position
:
"
absolute
"
,
top
:
0
,
height
:
"
100%
"
,
display
:
"
flex
"
,
justifyContent
:
"
flex-end
"
,
flexDirection
:
"
column
"
,
pointerEvents
:
"
none
"
,
zIndex
:
10
,
zIndex
:
10
,
top
:
"
94%
"
,
},
container
:
{
pointerEvents
:
"
auto
"
,
},
},
};
};
return
(
return
(
<
div
style
=
{
styles
.
container
}
>
<
div
style
=
{
styles
.
flex_container
}
>
<
Button
<
div
style
=
{
styles
.
container
}
>
href
=
"
https://gitlab.labranet.jamk.fi/data-analysis-and-ai/lam-station-visualization/blob/master/README.md
"
<
Button
size
=
"
large
"
href
=
"
https://gitlab.labranet.jamk.fi/data-analysis-and-ai/lam-station-visualization/blob/master/README.md
"
>
size
=
"
large
"
More
Info
>
<
/Button
>
More
Info
<
/Button
>
<
/div
>
<
/div
>
<
/div
>
);
);
}
}
...
...
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