onDrag(event) {
    if (this.drag.pinched === true) {
      return;
    }

    // remove the focus on node if it is focussed on by the focusOnNode
    this.body.emitter.emit("unlockNode");

    const pointer = this.getPointer(event.center);

    const selection = this.drag.selection;
    if (selection && selection.length && this.options.dragNodes === true) {
      this.selectionHandler.generateClickEvent("dragging", event, pointer);

      // calculate delta's and new location
      const deltaX = pointer.x - this.drag.pointer.x;
      const deltaY = pointer.y - this.drag.pointer.y;

      // update position of all selected nodes
      selection.forEach((selection) => {
        const node = selection.node;
        // only move the node if it was not fixed initially
        if (selection.xFixed === false) {
          node.x = this.canvas._XconvertDOMtoCanvas(
            this.canvas._XconvertCanvasToDOM(selection.x) + deltaX
          );
        }
        // only move the node if it was not fixed initially
        if (selection.yFixed === false) {
          node.y = this.canvas._YconvertDOMtoCanvas(
            this.canvas._YconvertCanvasToDOM(selection.y) + deltaY
          );
        }
      });

      // start the simulation of the physics
      this.body.emitter.emit("startSimulation");
    } else {
      // create selection box
      if (event.srcEvent.shiftKey) {
        this.selectionHandler.generateClickEvent(
          "dragging",
          event,
          pointer,
          undefined,
          true
        );

        // if the drag was not started properly because the click started outside the network div, start it now.
        if (this.drag.pointer === undefined) {
          this.onDragStart(event);
          return;
        }

        this.body.selectionBox.position.end = {
          x: this.canvas._XconvertDOMtoCanvas(pointer.x),
          y: this.canvas._YconvertDOMtoCanvas(pointer.y),
        };
        this.body.emitter.emit("_requestRedraw");
      }

      // move the network
      if (this.options.dragView === true && !event.srcEvent.shiftKey) {
        this.selectionHandler.generateClickEvent(
          "dragging",
          event,
          pointer,
          undefined,
          true
        );

        // if the drag was not started properly because the click started outside the network div, start it now.
        if (this.drag.pointer === undefined) {
          this.onDragStart(event);
          return;
        }

        const diffX = pointer.x - this.drag.pointer.x;
        const diffY = pointer.y - this.drag.pointer.y;

        this.body.view.translation = {
          x: this.drag.translation.x + diffX,
          y: this.drag.translation.y + diffY,
        };
        this.body.emitter.emit("_requestRedraw");
      }
    }
  }
handle drag event
@param {Event} event
@private