我正在努力让最新版本的GetOrgChart适用于我的公司网站,但其网站上的最新版本在Firefox和Chrome中无法正常运行。鼠标滚动和移动不起作用,但它在IE中工作正常。我从去年发现了一个使用Way Back Machine的工作版本,但是当比较两者时,有太多的变化,我对JavaScript的了解不足以找出问题所在。
我正在使用GetOrgChart版本2.4.8我有一个类似的运动问题,尽管使用相同版本的chrome,但箭头在某些机器上无法正常工作或显示。但是如果你专门用以下代码更新了getorgchart.js文件,那么问题就解决了。因此,搜索此代码块并将其更改为
if (this.config.enableMove) {
if ("ontouchstart" in window) {
this._q(this._X._t, "touchstart", this._y, "canvasContainer");
this._q(this._X._t, "touchmove", this._b, "canvasContainer");
this._q(this._X._t, "touchend", this._g, "canvasContainer")
} else {
this._q(this._X._zr, "mousedown", this._aS);
this._q(this._X._am, "mousedown", this._aS);
this._q(this._X._Q, "mousedown", this._aS);
this._q(this._X._zB, "mousedown", this._aS);
this._q(this._X._t, "mousemove", this._aA);
this._q(this._X._t, "mousedown", this._aQ);
this._q(this._X._t, "mouseup", this._aZ);
this._q(this._X._t, "mouseleave", this._aZ)
}
}
成:
if (this.config.enableMove) {
this._q(this._X._zr, "mousedown", this._aS);
this._q(this._X._am, "mousedown", this._aS);
this._q(this._X._Q, "mousedown", this._aS);
this._q(this._X._zB, "mousedown", this._aS);
this._q(this._X._t, "mousemove", this._aA);
this._q(this._X._t, "mousedown", this._aQ);
this._q(this._X._t, "mouseup", this._aZ);
this._q(this._X._t, "mouseleave", this._aZ)
}