2
'mousewheel.zoom'事件('d3.js')不適用於Firefox瀏覽器(I得到最新版本的FF)。d3.js'mousewheel'事件不適用於Firefox(僅適用於Chrome,Safari和IE瀏覽器)
這裏的代碼一小片,我使用,以消除來自我的地圖鼠標滾輪事件:
功能draw_data_center(FILE_NAME){
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)
有人可以幫助我問題?
你可以看看這篇文章:http://www.sitepoint.com/html5-javascript-mouse-wheel/ –