remove pinch to zoom

This commit is contained in:
Pete Matsyburka committed 2026-10-03 14:05:38 +03:00
1 parent 1687a372ae
commit a990d22831
5 files changed
+24 -71

No files matched your search

@@ -67,6 +67,7 @@
<DynamicBlockMenu
v-if="editable && blockMenuCoords && !isDrawMode"
:coords="blockMenuCoords"
:get-resize-limits="getBlockResizeLimits"
@command="onBlockCommand"
@resize="onBlockResize"
/>
@@ -535,12 +536,19 @@ export default {
coords.isRegular = isRegularTable(table.node)
coords.canMerge = editor.can().mergeTableCells()
coords.canSplit = editor.can().splitTableCell()
coords.minHeight = tableRowMinHeights(dom, this.zoom, false).reduce((acc, value) => acc + value, 0)
coords.maxWidth = Math.max(this.$refs.editorElement.getBoundingClientRect().right - rect.left, rect.width)
}
this.blockMenuCoords = coords
},
getBlockResizeLimits () {
const dom = this.editor.view.nodeDOM(this.blockMenuCoords.pos)
const rect = dom.getBoundingClientRect()
return {
minHeight: tableRowMinHeights(dom, this.zoom, false).reduce((acc, value) => acc + value, 0),
maxWidth: Math.max(this.$refs.editorElement.getBoundingClientRect().right - rect.left, rect.width)
}
},
onBlockResize ({ width, height }) {
resizeTable(this.editor.view, this.blockMenuCoords.pos, { width: width / this.zoom, height: height / this.zoom }, this.zoom)