【问题标题】:GetOrgChart Mouse Movement Broken In Chrome and Firefox在 Chrome 和 Firefox 中 GetOrgChart 鼠标移动中断
【发布时间】:2017-10-18 23:21:31
【问题描述】:

我正在尝试让最新版本的 GetOrgChart 在我的公司网站上运行,但他们网站上的最新版本在 Firefox 和 Chrome 中无法正常运行。鼠标滚动和移动不起作用,但在 IE 中可以正常工作。我从去年找到了一个使用 Way Back Machine 的工作版本,但是在比较两者时发现太多变化,我对 JavaScript 的了解还不够,无法找出问题所在。

【问题讨论】:

    标签: javascript getorgchart


    【解决方案1】:

    我正在使用 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)
           }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-31
      • 2012-06-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多