Comments (5)
Can you give a small example of what you mean? Could be a demo, sample code or documentation.
from angular-sticky.
I found it hard to write pseudo code for our use case, so I'll try to explain. On desktop the scroll event is fired multiple times during scrolling as expected. On mobile touch devices though, the scroll event is only fired when the scrolling is complete, that is you remove the finger from the screen and momentum scrolling has stopped. This results in a rather long delay for updating the stickyness.
Firing events during momentum scrolling is whole different topic but at least for moving the page there are the touchmove events which the plugin could listen to in addition to scroll events.
Demo for touchmove here: http://tomicloud.com/2012/03/multi-touch-demo
As an alternative way, maybe there could be an option to trigger an update of the sticky elements? I found the draw() method but I am not sure if this would be the right place.
from angular-sticky.
I understand now and also you make a good point that made me realize something. You can use the draw
method in order to bind you own touch events whatever that looks like.
I think from this demo it will become apparent what I mean. You then can bind other events than scroll
that will call the draw
method. The only downside is that you can no longer use the hl-sticky
directive, but the result is the same.
from angular-sticky.
Alright, we'll use the draw
method then, thanks. Maybe custom callbacks on the h1-sticky
directive can be put on the someday-later-list :)
from angular-sticky.
Alright, they might be some day.
Perhaps you can show me some example code when you're done with the implementation, because it might inspire me to make features that have those callbacks supported.
from angular-sticky.
Related Issues (20)
- bodyEl.scrollTop is not a function error HOT 14
- layout breaks when using ng-show HOT 4
- prevent stacking of non-overlapping sticky elements? HOT 3
- elementWidth() HOT 3
- requires jquery even though you mention its a pure javascript implementation. HOT 3
- bug with width HOT 1
- Replaces the element with a div HOT 2
- Enable redraw method for directive HOT 1
- Immediately show sticky-element (bottom) HOT 7
- Not sticky when at top of page (window.scrollY = 0) HOT 2
- Angular 1.5.8
- Placeholder causes the window to scroll-down when using ui-bootstrap's popover HOT 3
- Page Jumps on click HOT 1
- Placeholder height doesn't change after dynamic height change of sticky element HOT 3
- We cannot update bower HOT 2
- Sticky element position don't rerendred on resize HOT 1
- z-index is always relative to 1039
- Want it Sticky only after scrolling past other bottom elements
- All the stack and collection demos are broken HOT 1
- Need help? HOT 1
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 angular-sticky.