1 回答
TA贡献1719条经验 获得超6个赞
jtopo-0.4.8.js 中 第768行中的m(b) 方法,对4个方向键 进行了屏蔽,放开屏蔽即可,源码如下:
function m(b)
{
a.util.isIE || !window.addEventListener ? (b.onmouseout = f, b.onmouseover = e, b.onmousedown = g, b.onmouseup = h, b.onmousemove = i, b.onclick = j, b.ondblclick = k, b.onmousewheel = l, b.touchstart = g, b.touchmove = i, b.touchend = h) : (b.addEventListener("mouseout", f), b.addEventListener("mouseover", e), b.addEventListener("mousedown", g), b.addEventListener("mouseup", h), b.addEventListener("mousemove", i), b.addEventListener("click", j), b.addEventListener("dblclick", k), a.util.isFirefox ? b.addEventListener("DOMMouseScroll", l) : b.addEventListener("mousewheel", l)),
window.addEventListener && (window.addEventListener("keydown", function (b)
{
n.dispatchEventToScenes("keydown", a.util.cloneEvent(b));
var c = b.keyCode;
(37 == c || 38 == c || 39 == c || 40 == c) && (b.preventDefault ? b.preventDefault() : (b = b || window.event, b.returnValue = !1))
}, !0), window.addEventListener("keyup", function (b)
{
n.dispatchEventToScenes("keyup", a.util.cloneEvent(b));
var c = b.keyCode;
(37 == c || 38 == c || 39 == c || 40 == c) && (b.preventDefault ? b.preventDefault() : (b = b || window.event, b.returnValue = !1))
}, !0))
}
添加回答
举报