JVectorMap滚动速度和全屏问题 [英] JVectorMap Scroll Speed and Full screen Issue

查看:98
本文介绍了JVectorMap滚动速度和全屏问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JVectorMap在我的网站上创建地图页面.但是我发现滚动缩放速度要慢得多.如何调整滚动速度?没有有关此问题的文档.我发现了:

I am using JVectorMap to create a map Page on my Website. However I found that the scrolling zoom speed is much to slow. How do I adjust the scroll speed? There is no documentation for this issue. I found this:

zoomStep: 1.6,

但这是为按钮指定缩放步骤,而不是滚动.

This is however to specify the zoom step for the buttons, not the scrolling.

我发现的另一个问题是我无法将地图容器"的高度设置为:

Another issue that I have found is that I cannot set the height of the Map Container to:

window.innerHeight;

但是我可以将宽度设置为:

But i can however set the width to:

window.innerWidth;

如何将地图容器"的高度指定为与窗口"大小相关?我也尝试过使用%值.

How can I specify to Height of the Map container to be in relation to the Window size? I've also tried using a % value.

谢谢

推荐答案

这可能是很晚的答案,甚至可能已经在某处得到了答案. 但是我在鼠标滚动速度上遇到了同样的问题,并找到了解决方案. 可以在2382行的js文件中对其进行修复

this might be quite late answer, even might have been already answered somewhere. But i got the same problem with mouse scroll speed and found the solution. It can be fixed in js file in line 2382

zoomStep = Math.pow(1.003, event.deltaY);

您可以通过更改该"1.003"值来轻松更改速度.您所做的越多-滚动速度就越快.

You can easily change speed by changing that "1.003" value. More you make it - faster the scroll is.

我不完全了解您的第二个问题.但是,如果它是关于容器的高度,则只使用%值作为高度.确保您的父母也有一些身高值.

I didnt fully understand the second problem of yours. But if it is about container height, I just use % values for the height. Make sure your parent has some height value as well.

这篇关于JVectorMap滚动速度和全屏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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