chore: lint files

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-04-11 20:28:02 +02:00
committed by Braks
parent ab18bbc7d8
commit 5560949ed1
23 changed files with 247 additions and 80 deletions
@@ -10,14 +10,22 @@ interface Props extends HTMLAttributes {
}
function shiftX(x: number, shift: number, position: Position): number {
if (position === Position.Left) return x - shift
if (position === Position.Right) return x + shift
if (position === Position.Left) {
return x - shift
}
if (position === Position.Right) {
return x + shift
}
return x
}
function shiftY(y: number, shift: number, position: Position): number {
if (position === Position.Top) return y - shift
if (position === Position.Bottom) return y + shift
if (position === Position.Top) {
return y - shift
}
if (position === Position.Bottom) {
return y + shift
}
return y
}
@@ -25,7 +25,9 @@ onMounted(getBox)
watch([() => x, () => y, $$(el), () => label], getBox)
function getBox() {
if (!el) return
if (!el) {
return
}
const nextBox = el.getBBox()
@@ -71,7 +71,9 @@ const EdgeWrapper = defineComponent({
})
return () => {
if (!sourceNode || !targetNode || !edge) return null
if (!sourceNode || !targetNode || !edge) {
return null
}
let sourceNodeHandles
if (connectionMode.value === ConnectionMode.Strict) {
@@ -238,7 +240,9 @@ const EdgeWrapper = defineComponent({
}
function handleEdgeUpdater(event: MouseEvent, isSourceHandle: boolean) {
if (event.button !== 0) return
if (event.button !== 0) {
return
}
updating = true