Slickgrid在Android浏览器(内DIV滚动) [英] Slickgrid in the Android Browser (inner-div scrolling)

查看:286
本文介绍了Slickgrid在Android浏览器(内DIV滚动)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android浏览器不能滚动内心的div。这意味着使用SlickGrid其默认配置是不可能的。

The Android Browser can't scroll inner divs. That means using SlickGrid with its default configuration is impossible.

幸运的是,SlickGrid有一个autoHeight参数,使得它不使用内滚动内容,所以它适用于android的。不幸的是,当启用时autoHeight,onViewportChanged被调用一次跨越整个视口,并永远不会再调用,因此它会尝试一次加载所有数据。我懒加载和显示如此多的远程数据,如果你尝试加载它一下子崩溃的移动设备,所以这是一个没有去。

Fortunately, SlickGrid has an autoHeight argument that makes it not use inner scrollable content, so it works on the android. Unfortunately, when autoHeight is enabled, onViewportChanged gets called once to span the entire viewport and is never called again, so it attempts to load all the data at once. I'm lazy-loading and displaying so much remote data that if you try and load it all at once it crashes mobile devices, so that's a no go.

如果SlickGrid足够聪明,知道什么是即使autoHeight启用了屏幕,这将解决我的问题上。我喜欢它,如果这是核心功能,因为这将解决在桌面上以及在Android设备上的许多问题。

If SlickGrid were smart enough to know what's on the screen even if autoHeight is enabled, that would solve my problem. I'd love it if that was a feature in core, since that would solve many problems on the desktop as well as on Android devices.

我还使用 iScroll 4 绕过Android的限制尝试。不幸的是,它不会触发所有onViewportChanged当我使用iScroll。

I also tried using iScroll 4 to get around the Android limitation. Unfortunately, it doesn't trigger onViewportChanged at all when I use iScroll.

我将可能有被抛弃或修改onViewportChanged来处理我自己的滚动事件来解决这个问题。我在想,如果有这种虽然现有的解决方案。

I will probably have to solve this by ditching or modifying onViewportChanged to handle my own scrolling events. I was wondering if there is an existing solution for this though.

推荐答案

我最后写我对自己的版本slickgrid < /一>用于此目的。此外,当谷歌浏览器成为默认浏览器,这将变得无关紧要,因为它实际上有体面的滚动支持。

I ended up writing my own version of slickgrid for this purpose. Also, this will become irrelevant when Google Chrome becomes the default browser, as it actually has decent support for scrolling.

这篇关于Slickgrid在Android浏览器(内DIV滚动)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆