riku
2024-02-05 7607d55d6597d772de1a37598d36e74c4542223e
lib/dialog.js
@@ -1,4 +1,13 @@
var DialogUtil = {
  show: true,
  toggleDataDialog() {
    this.show = !this.show;
    if (this.show) {
      return '数据弹框:开';
    } else {
      return '数据弹框:关';
    }
  },
  /**
   * 创建弹出框
   * @param {*} factorDatas 监测数据
@@ -223,4 +232,16 @@
    info.appendChild(bottom);
    return info;
  },
  openNewWindow(factorDatas, i, map, position, onClose) {
    if (!this.show) return
    const window = this.createInfoWindow(factorDatas, i, onClose)
    window.open(map, position);
  },
  openNewWindow2(factorData, map, position, onClose) {
    if (!this.show) return
    const window = this.createInfoWindow2(factorData, onClose)
    window.open(map, position);
  }
};