在WinJS.UI.Listview中插入项目的奇怪动画 [英] Weird animation on inserting items in a WinJS.UI.Listview
问题描述
我有一个WinJs.UI.Listview,有多个行和列,显示来自Web查询的结果。我需要根据某些索引将项目插入到正确的位置(结果是无序接收的)。所以我在WinJS.Binding.List中使用splice方法
来执行此操作。但是由于移动记录而导致的动画并不好。 发生的事情是,当在网格中间插入新结果时,插入点之后的所有内容都会向下滑动,一旦这些项目
完成滑动,就会有一段时间空白,然后是新结果淡入。
有没有办法在Listview中禁用滑动动画,只是让记录淡入/淡出?
我唯一能想到的是重新定义ui.js中的隐藏函数,不做动画。
13439行有_ListViewAnimationHelper:fadeInXXX函数。
您可以在对象中重新定义它,但我不确定您是否会处于受支持的场景中!
-Jeff
I have a WinJs.UI.Listview with has multiple rows and columns that shows results from a web query. I need to insert items in the proper position as they are received based on some index( the results are received out of order). So I use the splice method in the WinJS.Binding.List to do so. But the animation as a result of moving the records is not good. What is happening is that when new results are inserted in the middle of the grid, everything after the insertion point slides down, once those items have finished sliding, there is an empty gap for some time, and then the new results fade in.
Is there any way to disable the sliding animation in the Listview, and just have the records fade in/out ?
The only thing I can think of is to redefine the hidden function in ui.js to not do animation.
Line 13439 has the _ListViewAnimationHelper:fadeInXXX functions.
You could redefine that in your object but I am not sure you will be in a supported scenario!
-Jeff
这篇关于在WinJS.UI.Listview中插入项目的奇怪动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!