From 0e139785a5cc6907f3e6f5e3886b1b1cf2f48da3 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 20 Aug 2021 23:45:57 -0500 Subject: [PATCH] Fixed a couple type errors --- src/components/board/Board.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 21e966d..8ee94e0 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -126,7 +126,7 @@ export default defineComponent({ getZoomLevel(): number { return (this.$refs.stage as any).$panZoomInstance.getTransform().scale; }, - onInit: function(panzoomInstance) { + onInit: function(panzoomInstance: any) { panzoomInstance.setTransformOrigin(null); }, startDragging(e: MouseEvent, nodeID: string) { @@ -168,7 +168,7 @@ export default defineComponent({ nodes.push(draggingNode); if (receivingNode) { - this.board.types[receivingNode.type].onDrop(receivingNode, draggingNode); + this.board.types[receivingNode.type].onDrop?.(receivingNode, draggingNode); } this.dragging = null;