             const logicalHeight = parseFloat(this.canvasOriginal.style.height);

                        let newX = pos.x - this.dragOffsetX;
                        let newY = pos.y - this.dragOffsetY;
                        newX = Math.max(0, Math.min(logicalWidth, newX));
                        newY = Math.max(0, Math.min(logicalHeight, newY));
                        this.mainPatch.points[this.draggingPointInfo.colIndex][this.draggingPointInfo.rowIndex].x = newX;
                        this.mainPatc