chore(docs): lint
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -69,7 +69,9 @@ watch([() => props.targetY, () => props.targetX], (_, __, onCleanup) => {
|
||||
},
|
||||
)
|
||||
|
||||
if (!closestNode.node) return
|
||||
if (!closestNode.node) {
|
||||
return
|
||||
}
|
||||
|
||||
canSnap.value = closestNode.distance < SNAP_DISTANCE
|
||||
|
||||
@@ -92,8 +94,9 @@ watch([() => props.targetY, () => props.targetX], (_, __, onCleanup) => {
|
||||
},
|
||||
edges.value,
|
||||
)
|
||||
)
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
if (closestHandle) {
|
||||
const el = document.querySelector(`[data-handleid='${closestHandle.id}']`)
|
||||
|
||||
@@ -19,14 +19,22 @@ const connectionLineStyle = { stroke: '#fff' }
|
||||
|
||||
// minimap stroke color functions
|
||||
function nodeStroke(n) {
|
||||
if (n.type === 'input') return '#0041d0'
|
||||
if (n.type === 'custom') return presets.sumi
|
||||
if (n.type === 'output') return '#ff0072'
|
||||
if (n.type === 'input') {
|
||||
return '#0041d0'
|
||||
}
|
||||
if (n.type === 'custom') {
|
||||
return presets.sumi
|
||||
}
|
||||
if (n.type === 'output') {
|
||||
return '#ff0072'
|
||||
}
|
||||
return '#eee'
|
||||
}
|
||||
|
||||
function nodeColor(n) {
|
||||
if (n.type === 'custom') return bgColor.value
|
||||
if (n.type === 'custom') {
|
||||
return bgColor.value
|
||||
}
|
||||
return '#fff'
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@ export function getElements(xElements = 10, yElements = 10) {
|
||||
source: recentNodeId.toString(),
|
||||
target: nodeId.toString(),
|
||||
style: (edge) => {
|
||||
if (!edge.sourceNode.selected && !edge.targetNode.selected) return
|
||||
if (!edge.sourceNode.selected && !edge.targetNode.selected) {
|
||||
return
|
||||
}
|
||||
return { stroke: '#10b981', strokeWidth: 3 }
|
||||
},
|
||||
})
|
||||
|
||||
@@ -118,7 +118,9 @@ onNodeDoubleClick(({ node }) => {
|
||||
stopHandle = watchDebounced(
|
||||
output,
|
||||
(next) => {
|
||||
if (!showDot.value) return
|
||||
if (!showDot.value) {
|
||||
return
|
||||
}
|
||||
|
||||
const nextLength = curve.value.getTotalLength()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user