onDragHandler()

in app/ItemView/CodeMirrorContainer.tsx [86:94]


  onDragHandler(evt: MouseEvent) {
    if (this.cm) {
      const calculatedHeight = this.state.startH + evt.y - this.state.startY;
      const desiredHeight = Math.max(this.CM_MIN_HEIGHT, calculatedHeight);
      this.cm.setSize(null, `${desiredHeight}px`);
    } else {
      console.error("codeMirror not set in state so can't change it");
    }
  }