mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
build assets
This commit is contained in:
parent
67866a54b3
commit
c5b80071f1
3 changed files with 1659 additions and 1812 deletions
|
@ -6,6 +6,7 @@
|
|||
"-Promise",
|
||||
"moment",
|
||||
"$",
|
||||
"jQuery",
|
||||
"_",
|
||||
"is",
|
||||
"Mousetrap",
|
||||
|
|
13
app/vendor/documize.js
vendored
13
app/vendor/documize.js
vendored
|
@ -10,22 +10,19 @@
|
|||
// https://documize.com
|
||||
|
||||
$.fn.inView = function(){
|
||||
let win = $(window);
|
||||
let obj = $(this);
|
||||
var win = $(window);
|
||||
var obj = $(this);
|
||||
|
||||
// trap for no object
|
||||
if (obj.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// the top Scroll Position in the page
|
||||
let scrollPosition = win.scrollTop();
|
||||
var scrollPosition = win.scrollTop();
|
||||
|
||||
// the end of the visible area in the page, starting from the scroll position
|
||||
let visibleArea = win.scrollTop() + win.height();
|
||||
var visibleArea = win.scrollTop() + win.height();
|
||||
|
||||
// we check to see if the start of object is in view
|
||||
let objPos = obj.offset().top;// + obj.outerHeight();
|
||||
var objPos = obj.offset().top;// + obj.outerHeight();
|
||||
|
||||
return(visibleArea >= objPos && scrollPosition <= objPos ? true : false);
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue