[英]Ion slide box dynamic slide update flickering
I'm refactoring the list on each swap in a way that it will remove one item from the opposite direction and push another item from that direction. 我正在重构每个交换上的列表,以便从相反的方向删除一个项目,然后从该方向推送另一个项目。 Resetting the active index.
重置活动索引。 Then updating the slidebox by
然后通过以下方式更新幻灯片框
$ionicSlideBoxDelegate.$getByHandle('custom-slider').update();
The issue is, it updates the slidebox with the default index and then let the new index to appear. 问题是,它将使用默认索引更新幻灯片框,然后让新索引出现。 Looks like flickering.
看起来像是闪烁。 How to prevent from this?
如何预防呢?
What I've already tried out but unsuccessful 我已经尝试过但未成功的内容
$timeout
$timeout
包装更新 $ionicSlideBoxDelegate.$getByHandle('custom-slider').setup();
$ionicSlideBoxDelegate.$getByHandle('custom-slider').setup();
but got error like no method setup()
no method setup()
$timeout
to the list, it makes the list disappear for a while. $timeout
到列表,它使列表消失一会儿。 I used ionic version 1.3.3
and used new ion-slides
. 我使用了离子版本
1.3.3
并使用了新的ion-slides
。 These working great without flickering. 这些效果很好,没有闪烁。 Link: https://ionicframework.com/docs/v1/api/directive/ionSlides/
链接: https : //ionicframework.com/docs/v1/api/directive/ionSlides/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.