code: function DragAndScale(element, skip_events) {
          this.offset = new Float32Array([0, 0]);
          this.scale = 1;
          this.max_scale = 10;
          this.min_scale = 0.1;
          this.onredraw = null;
          this.enabled = true;
          this.last_mouse = [0, 0];
          this.element = null;
          this.visible_area = new Float32Array(4);
  
          if (element) {
              this.element = element;
              if (!skip_events) {
                  this.bindEvents(element);
              }
          }
      }
docs: **************************************** Scale and Offset