update(examples): correct examples

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 994dd9929c
commit 5139b0786b
28 changed files with 169 additions and 615 deletions
+4 -4
View File
@@ -69,18 +69,18 @@ export function getElements(): Elements {
y: edgeTypeIndex * 300 + sourceTargetIndex * edgeTypes.length * 300,
}
const sourceId = getNodeId()
const sourceData = { label: `Source ${sourceId}` }
const sourceLabel = `Source ${sourceId}`
const sourceNode = {
id: sourceId,
style,
data: sourceData,
label: sourceLabel,
position: sourcePosition,
sourcePosition: currSourceTargetPos.source,
targetPosition: currSourceTargetPos.target,
}
const targetId = getNodeId()
const targetData = { label: `Target ${targetId}` }
const targetLabel = `Target ${targetId}`
const targetPosition = {
x: sourcePosition.x + currOffset.x,
y: sourcePosition.y + currOffset.y,
@@ -88,7 +88,7 @@ export function getElements(): Elements {
const targetNode = {
id: targetId,
style,
data: targetData,
label: targetLabel,
position: targetPosition,
sourcePosition: currSourceTargetPos.source,
targetPosition: currSourceTargetPos.target,