projects
/
hnim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
946d788
)
Clearer order of operations
author
Jacob Casper
<dev@jacobcasper.com>
Thu, 10 Feb 2022 20:15:47 +0000
(14:15 -0600)
committer
Jacob Casper
<dev@jacobcasper.com>
Thu, 10 Feb 2022 20:15:47 +0000
(14:15 -0600)
hnim.js
patch
|
blob
|
blame
|
history
diff --git
a/hnim.js
b/hnim.js
index
aab3bc0
..
7ac3f5d
100644
(file)
--- a/
hnim.js
+++ b/
hnim.js
@@
-15,7
+15,7
@@
const visible = (element) => {
let bounds = element.getBoundingClientRect();
- return Math.abs(bounds.bottom - bounds.top) > window.innerHeight ||
bounds.top >= 0 && bounds.bottom <= window.innerHeight
;
+ return Math.abs(bounds.bottom - bounds.top) > window.innerHeight ||
(bounds.top >= 0 && bounds.bottom <= window.innerHeight)
;
}
const changeWithVisibleCallback = (comment, callback) => {