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
2335cb51
Commit
2335cb51
authored
6 years ago
by
Janne Alatalo
Browse files
Options
Downloads
Patches
Plain Diff
Remove the old unused tooltip code
parent
4dd9d956
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4046
passed
6 years ago
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/App.css
+0
-19
0 additions, 19 deletions
src/App.css
src/PointMap.js
+0
-17
0 additions, 17 deletions
src/PointMap.js
src/Tooltip.js
+0
-9
0 additions, 9 deletions
src/Tooltip.js
with
0 additions
and
45 deletions
src/App.css
+
0
−
19
View file @
2335cb51
.App
{
text-align
:
center
;
}
.tooltip
{
position
:
absolute
;
display
:
inline-block
;
border-bottom
:
1px
dotted
black
;
/* If you want dots under the hoverable text */
z-index
:
10
;
}
.tooltip
.tooltiptext
{
visibility
:
hidden
;
width
:
120px
;
background-color
:
black
;
color
:
#fff
;
text-align
:
center
;
padding
:
5px
0
;
border-radius
:
6px
;
position
:
absolute
;
}
This diff is collapsed.
Click to expand it.
src/PointMap.js
+
0
−
17
View file @
2335cb51
...
...
@@ -7,8 +7,6 @@ import CardActions from '@material-ui/core/CardActions';
import
Button
from
'
@material-ui/core/Button
'
;
import
Typography
from
'
@material-ui/core/Typography
'
;
import
Tooltip
from
'
./Tooltip.js
'
;
const
polygon_size
=
0.01
const
polygon_size_lat
=
polygon_size
*
2
const
polygon_size_lon
=
polygon_size
...
...
@@ -31,20 +29,6 @@ class PointMap extends Component {
this
.
state
=
{
viewport
,
mouseover
,
clicked
};
}
update_tooltip
(
visible
,
x
,
y
,
content
)
{
this
.
setState
((
prevState
)
=>
{
let
tooltipVisible
=
visible
;
y
-=
20
;
x
+=
10
;
let
tooltip
=
{
x
,
y
,
content
};
return
{
...
prevState
,
tooltipVisible
,
tooltip
,
};
});
}
handleOnHover
(
e
)
{
this
.
setState
(
prevState
=>
{
let
mouseover
=
null
;
...
...
@@ -213,7 +197,6 @@ class PointMap extends Component {
viewState
=
{
this
.
state
.
viewport
}
/
>
<
/DeckGL
>
{
this
.
state
.
tooltipVisible
&&
<
Tooltip
{...
this
.
state
.
tooltip
}
/>
}
{
this
.
state
.
clicked
&&
this
.
getCard
(
this
.
state
.
clicked
)
}
...
...
This diff is collapsed.
Click to expand it.
src/Tooltip.js
deleted
100644 → 0
+
0
−
9
View file @
4dd9d956
import
React
from
'
react
'
;
export
default
function
Tooltip
({
x
,
y
,
content
})
{
return
(
<
div
className
=
"
tooltip
"
style
=
{{
left
:
x
,
top
:
y
}}
>
<
div
>
{
content
}
<
/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