Disable page scroll but allow Google map scroll

耗尽温柔 提交于 2019-12-13 04:46:56

问题


I have an app using appmobi/xdk/appframework when I put in the package

It disables the scrollinf of the page vertically on the iPhone. However, it also disables the scrolling of the Google map on the page. Any ideas on how to re-enable the map scrolling?


回答1:


Just add scrolling="no" in your panel and data-footer="none" if u want more space for map

<div id="main" class="panel" selected="true" scrolling="no" data-footer="none">



回答2:


<!--If your are using the appmobi 3.4.0 platform -->
<div id="#pagetitle" title="Yourtitle" class="panel" scrolling="no">

<div id="map-google" style="overflow:visible;">


</div>

</div>

<!--If your are using the appmobi/intel XDK 4.0 platform-->

<div id="#pagetitle" title="Yourtitle" class="panel" style="overflow:hidden;">

<div id="map-google" style="overflow:visible;">

</div>

</div>



回答3:


the key is to add style="overflow:hidden" on your panel.

Here is sample code with appframework + google maps: http://jsbin.com/UKaQetO/1/edit

works on iphone,android and windows phone.



来源:https://stackoverflow.com/questions/19486222/disable-page-scroll-but-allow-google-map-scroll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!