Skip to content

Commit 4862a8b

Browse files
Update _tm.inview.js - removed unused variables and parameters
1 parent fe94693 commit 4862a8b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "timbercss",
3-
"version": "0.1.70",
3+
"version": "0.1.71",
44
"author": "UnlimitDesign",
55
"description": "A CSS Framework for Rapid Website Prototyping",
66
"keywords": [],

src/js/utilities/_tm.inview.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const tmInView = (function () {
116116
* Observe on intersect - modern browsers
117117
*/
118118
const observeOnIntersect = (element, threshold, detectionBuffer) =>{
119-
let elementObserver = new IntersectionObserver(function(entries, observer) {
119+
let elementObserver = new IntersectionObserver(function(entries) {
120120
entries.forEach(function(entry) {
121121
let item = entry.target;
122122
if(entry.isIntersecting){
@@ -210,7 +210,6 @@ const tmInView = (function () {
210210
let rect = element.getBoundingClientRect();
211211
let windowHeight = window.innerHeight + plugin.settings.detectionBuffer || document.documentElement.clientHeight + plugin.settings.detectionBuffer;
212212
let threshold = element.getAttribute('data-threshold') ? element.getAttribute('data-threshold') : plugin.settings.threshold;
213-
let isBeyondRect = Math.floor(100 - (((rect.top >= 0 ? 0 : rect.top) / +-( rect.height / 1 )) * 100)) < 1 || Math.floor( 100 - ((rect.bottom - windowHeight) / rect.height) * 100 ) < 1;
214213
let isBeyondThreshold = Math.floor(100 - (((rect.top >= 0 ? 0 : rect.top) / +-( rect.height / 1)) * 100)) < threshold * 100 || Math.floor( 100 - ((rect.bottom - windowHeight) / rect.height) * 100 ) < threshold * 100;
215214
return !(isBeyondThreshold);
216215
};

0 commit comments

Comments
 (0)