'mousewheel.zoom' 事件('d3.js')在 Firefox 浏览器上不起作用(我得到了最新版本的 FF)。
这是我用来从我的地图中删除鼠标滚轮事件的一小段代码:
函数draw_data_center(文件名){
d3.json(file_name, function(json) {
d3.select("#div_data_center svg").remove();
vis = d3.select("#div_data_center").append("svg")
.attr("width", $("#div_data_center").width())
.attr("height", $("#div_data_center").height())
.attr("pointer-events", "all")
.append('svg:g')
.call(zoom.on("zoom", redraw))
.on("mousewheel.zoom", null) //in this line of code I removed the 'mousewheel' functionality BUT it doesn't work in Firefox browser (the other browsers work correctly)
.on("click.zoom", null)
.on("touchstart.zoom", null)
.append('svg:g').......(etc...ect)
有人可以帮我解决这个问题吗?