Closed Ben-Wormald closed 8 years ago
In the current release it is not possible to offset the viewport dimensions, just the virtual dimensions of the actual element. I wouldn't know how to do what you are looking for with the current capabilities.
now possible in v2
I'm trying to get an element to only show when it's in a relatively small area in the middle of the window, so I've added a negative offsetBottom and positive offsetTop to set the bounds of where the element should be visible. However, when these offset values sum to more than the height of the element, it has no 'virtual height' and $inView always gives a value of false. This also occurs when using only either a negative offsetBottom or positive offsetTop greater than the element's height.
Would it be possible to allow $inView to be true when the element has a zero/negative virtual height?
(Or am I just using the offset values incorrectly?)