<iron-pullable-container>
enable a given container to be pulled and be notified if a certain threshold has been reached to take any actions, like refreshing the container's content.
Install the component using Bower:
$ bower install iron-pullable-container --save
Import Custom Element:
<link rel="import" href="bower_components/iron-pullable-container/iron-pullable-container.html">
And then use it:
<iron-pullable-container
on-iron-pull-start="_handlePullStart"
on-iron-pull-end="_handlePullEnd"
auto-close>
<span id="spanId" class="underlay">Loading...</span>
<div class="container">
<div class="big">Pull me down!</div>
<div class="extend">(I was pulled [[_nbPull]] time(s))</div>
</div>
</iron-pullable-container>
...
scope._handlePullStart = function() {
scope._nbPull++;
scope.$.spanId.style.opacity = 1;
};
scope._handlePullEnd = function() {
scope.$.spanId.style.opacity = 0;
};
See the Documentation for more options.
https://geoloeg.github.io/iron-pullable-container/
If you have any questions, you can find me on the Polymer Slack Channel, or just raise an Issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D