Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
2fa01886
Unverified
Commit
2fa01886
authored
Nov 27, 2022
by
Tiefseemonster
Committed by
GitHub
Nov 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: tooltip overlaps a window border (#599)
parent
dd7d322c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
UsageHeatMap.tsx
web/src/components/UsageHeatMap.tsx
+5
-0
usage-heat-map.less
web/src/less/usage-heat-map.less
+6
-0
No files found.
web/src/components/UsageHeatMap.tsx
View file @
2fa01886
...
...
@@ -64,6 +64,11 @@ const UsageHeatMap = () => {
tempDiv
.
style
.
top
=
bounding
.
top
-
2
+
"px"
;
tempDiv
.
innerHTML
=
`
${
item
.
count
}
memos on <span className="date-text">
${
new
Date
(
item
.
timestamp
as
number
).
toDateString
()}
</span>`
;
document
.
body
.
appendChild
(
tempDiv
);
if
(
tempDiv
.
offsetLeft
-
tempDiv
.
clientWidth
/
2
<
0
)
{
tempDiv
.
style
.
left
=
bounding
.
left
+
tempDiv
.
clientWidth
*
0.4
+
"px"
;
tempDiv
.
className
+=
" offset-left"
;
}
},
[]);
const
handleUsageStatItemMouseLeave
=
useCallback
(()
=>
{
...
...
web/src/less/usage-heat-map.less
View file @
2fa01886
...
...
@@ -54,6 +54,12 @@
@apply text-gray-300;
}
&.offset-left {
&::before {
left: calc(10% - 5px);
}
}
&::before {
content: "";
position: absolute;
...
...
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