第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

不推薦使用的SVG pathSegList的替代方法

不推薦使用的SVG pathSegList的替代方法

牛魔王的故事 2019-11-19 14:33:51
我正在編寫一個擴展折線功能的Leaflet插件。在我的插件中,我正在使用SVGPathSegList接口訪問路徑段。但是根據(jù)Chrome DevTools的說明,該接口將在Chrome 48中刪除。我正在尋找另一種訪問路徑段的可能性。這是我的小提琴。(function () {    var __onAdd = L.Polyline.prototype.onAdd,        __onRemove = L.Polyline.prototype.onRemove,        __updatePath = L.Polyline.prototype._updatePath,        __bringToFront = L.Polyline.prototype.bringToFront;    L.Polyline.include({      onAdd: function (map) {          __onAdd.call(this, map);          this._textRedraw();      },      onRemove: function (map) {          __onRemove.call(this, map);      },      bringToFront: function () {          __bringToFront.call(this);          this._textRedraw();      },      _textRedraw: function () {            var textNodes = this._path.parentElement.getElementsByTagName('text'),                tnIndex;                    if (textNodes.length > 0) {                for (tnIndex = textNodes.length - 1; tnIndex >= 0; tnIndex -= 1) {                    textNodes[tnIndex].parentNode.removeChild(textNodes[tnIndex]);              }          }          if (this.options.measurements) {              this.setText();          }      },      setText: function () {            var path = this._path,                points = this.getLatLngs(),                pathSeg,                prevPathSeg,                center,                angle,                rotation,                textNode;          /*            * If not in SVG mode or Polyline not added to map yet return           * setText will be called by onAdd, using value stored in this._text           */          if (!L.Browser.svg || typeof this._map === 'undefined') {              return this;          }
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 719 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號