admin管理员组文章数量:1431726
I'm currently working on an app that has fullscreen slides, the thing is that I want to be able to stop the bounce effect whenever I'm either on the first slide or the last slide.
That is, if I'm on the start slide, disable the bouncing effect when dragging from the left. Likewise, if I'm on the last slide, disable the bouncing effect when dragging from the right. Is there a way to implement this?
(I know that Ionic has attribute name hasBounce
, but that only works for the ion-content
directive, and it only works for the top and the bottom)
I'm currently working on an app that has fullscreen slides, the thing is that I want to be able to stop the bounce effect whenever I'm either on the first slide or the last slide.
That is, if I'm on the start slide, disable the bouncing effect when dragging from the left. Likewise, if I'm on the last slide, disable the bouncing effect when dragging from the right. Is there a way to implement this?
(I know that Ionic has attribute name hasBounce
, but that only works for the ion-content
directive, and it only works for the top and the bottom)
2 Answers
Reset to default 5You could use has-bouncing
on ion-content
<ion-content
has-bouncing="false"
start-y="55"
padding="true"
has-tabs="true"
has-header="true">
working in ionic 1.3.1 ;)
i searched in lib/ionic/jsionic.bundle.js
.directive('ionSlideBox', [
'$animate',
'$timeout',
'$pile',
'$ionicSlideBoxDelegate',
'$ionicHistory',
'$ionicScrollDelegate',
function($animate, $timeout, $pile, $ionicSlideBoxDelegate, $ionicHistory, $ionicScrollDelegate) {
return {
restrict: 'E',
replace: true,
transclude: true,
scope: {
autoPlay: '=',
doesContinue: '@',
slideInterval: '@',
showPager: '@',
pagerClick: '&',
disableScroll: '@',
onSlideChanged: '&',
activeSlide: '=?',
bounce: '@'
},
....
, bounce: '@'
so bounce is working :)
<ion-slide-box bounce="false" ></ion-slide-box>
本文标签: javascriptIonic Framework how to disable bounce effect in slider boxStack Overflow
版权声明:本文标题:javascript - Ionic Framework: how to disable bounce effect in slider box? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745590901a2665190.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论