Comments (1)
Thanks @yuchant! It seems to be due to the scrollbar. CSS considers the scrollbar to be in the viewport. That explains why left: -300px
is in the viewport but right: -300px
isn't. It's weird that switching to position: absolute
changes the result though, isn't it? To be safe you could add extra space like right: -320px
or use verge.inViewport(drawer, -20)
to be sure it's at least 20px
in the viewport. Or workaround the issue by transitioning width
rather than right
like
.drawer {
position: fixed;
width: 300px;
right: 0;
top: 0;
bottom: 0;
transition: width .2s ease-in-out;
}
.drawer.is-offscreen {
width: 0;
overflow: hidden;
}
from verge.
Related Issues (20)
- viewportH returns document height, not viewport height. HOT 1
- Viewport width/height technique needs realtime detection HOT 1
- Let .viewport() also get values by name HOT 2
- Multiple elements with same class? HOT 2
- Watch functionality HOT 2
- Put it on bower HOT 5
- inViewport returns true if element is hidden HOT 3
- Not working as desired with table design websites
- inViewport falsely returns true HOT 10
- Add div with dynamic VergeJS viewport values to HTML HOT 2
- missing browser support in readme HOT 3
- v2 considerations HOT 2
- inViewport, inX, inY expressiveness HOT 2
- inViewport returns true for element starting at window.innerHeight HOT 1
- inViewPort but above 100px from the bottom of the ViewPort HOT 1
- Improving testing for verge
- Add typescript support HOT 1
- verge online library not on https HOT 1
- Compile as ES6 module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verge.