diff --git a/package.json b/package.json index 59e9c36..e1bfb61 100644 --- a/package.json +++ b/package.json @@ -51,9 +51,9 @@ }, "devDependencies": { "@nextcloud/browserslist-config": "^3.1.2", - "@eslint/js": "^9.39.3", - "@typescript-eslint/eslint-plugin": "^8.58.0", - "@typescript-eslint/parser": "^8.58.0", + "@eslint/js": "^10.0.1", + "@typescript-eslint/eslint-plugin": "^8.58.0", + "@typescript-eslint/parser": "^8.58.0", "@vitejs/plugin-vue": "^6.0.4", "eslint": "^10.1.0", "eslint-plugin-vue": "^10.8.0", diff --git a/src/components/DraggableElement.vue b/src/components/DraggableElement.vue index 4e9188d..549a4b4 100644 --- a/src/components/DraggableElement.vue +++ b/src/components/DraggableElement.vue @@ -371,15 +371,13 @@ export default defineComponent({ } const minSize = 16 / (this.pagesScale || 1) - let newWidth = this.startWidth - let newHeight = this.startHeight let newLeft = this.startLeft let newTop = this.startTop const widthChange = this.direction.includes('right') ? deltaX : this.direction.includes('left') ? -deltaX : 0 - newWidth = this.startWidth + widthChange + let newWidth = this.startWidth + widthChange if (newWidth < minSize) newWidth = minSize - newHeight = newWidth / this.aspectRatio + let newHeight = newWidth / this.aspectRatio if (this.direction.includes('left')) { newLeft = this.startLeft + (this.startWidth - newWidth) diff --git a/src/components/PDFElements.vue b/src/components/PDFElements.vue index 7f5e602..28769dc 100644 --- a/src/components/PDFElements.vue +++ b/src/components/PDFElements.vue @@ -1259,7 +1259,7 @@ export default defineComponent({ .flatMap(doc => doc.pageWidths || []) .filter(width => width > 0) - let maxCanvasWidth = 0 + let maxCanvasWidth if (widths.length) { maxCanvasWidth = Math.max(...widths) } else {