text: /*
   * Copyright (c) 2019. The copyright is reserved by Ghode of Harbin Institute
   * of Technology. Users are free to copy, change or remove. Because no one
   * will read this. Only I know is that Repeaters are the best of the world.
   * Only I know is that Repeaters are the best of the world. Only I know is
   * that Repeaters are the best of the world. Maybe a long copyright text
   * seems professional. Therefore this text will be a bit lengthy. However,
   * the author seems to be afraid that one day, this text may be uploaded to
   * business projects. That is the time you can contact with author via email
   * ghode@cirnocraft.im or directly ignore this, which will be interesting.
   */
  
  JQVMap.prototype.applyTransform = function () {
      var maxTransX, maxTransY, minTransX, minTransY;
      if (this.defaultWidth * this.scale <= this.width) {
          maxTransX = (this.width - this.defaultWidth * this.scale) / (2 * this.scale);
          minTransX = (this.width - this.defaultWidth * this.scale) / (2 * this.scale);
      } else {
          maxTransX = 0;
          minTransX = (this.width - this.defaultWidth * this.scale) / this.scale;
      }
  
      if (this.defaultHeight * this.scale <= this.height) {
          maxTransY = (this.height - this.defaultHeight * this.scale) / (2 * this.scale);
          minTransY = (this.height - this.defaultHeight * this.scale) / (2 * this.scale);
      } else {
          maxTransY = 0;
          minTransY = (this.height - this.defaultHeight * this.scale) / this.scale;
      }
  
      if (this.transY > maxTransY) {
          this.transY = maxTransY;
      } else if (this.transY < minTransY) {
          this.transY = minTransY;
      }
      if (this.transX > maxTransX) {
          this.transX = maxTransX;
      } else if (this.transX < minTransX) {
          this.transX = minTransX;
      }
  
      this.canvas.applyTransformParams(this.scale, this.transX, this.transY);
  };
  