chore: lint files
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user