chore: add prefix to console messages
This commit is contained in:
@@ -40,7 +40,6 @@ export const getHandle = (bounds: HandleElement[] = [], handleId?: string | null
|
||||
if (!handleId && bounds.length === 1) handle = bounds[0]
|
||||
else if (handleId) handle = bounds.find((d) => d.id === handleId)
|
||||
|
||||
console.log(handleId, handle, bounds)
|
||||
return handle
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ export const connectionExists = (edge: Edge, elements: Elements) =>
|
||||
*/
|
||||
export const addEdge = (edgeParams: Edge | Connection, elements: Elements, defaults?: DefaultEdgeOptions) => {
|
||||
if (!edgeParams.source || !edgeParams.target) {
|
||||
console.warn("Can't create edge. An edge needs a source and a target.")
|
||||
console.warn("[vueflow]: Can't create edge. An edge needs a source and a target.")
|
||||
return elements
|
||||
}
|
||||
|
||||
@@ -172,14 +172,14 @@ export const addEdge = (edgeParams: Edge | Connection, elements: Elements, defau
|
||||
*/
|
||||
export const updateEdge = (oldEdge: Edge, newConnection: Connection, elements: Elements) => {
|
||||
if (!newConnection.source || !newConnection.target) {
|
||||
console.warn("Can't create new edge. An edge needs a source and a target.")
|
||||
console.warn("[vueflow]: Can't create new edge. An edge needs a source and a target.")
|
||||
return elements
|
||||
}
|
||||
|
||||
const foundEdge = elements.find((e) => isEdge(e) && e.id === oldEdge.id)
|
||||
|
||||
if (!foundEdge) {
|
||||
console.warn(`The old edge with id=${oldEdge.id} does not exist.`)
|
||||
console.warn(`[vueflow]: The old edge with id=${oldEdge.id} does not exist.`)
|
||||
return elements
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user