PHondogo
11/08/2022, 10:39 PMdewildte
11/08/2022, 10:54 PMczuckie
11/08/2022, 11:13 PMModifier.draggable
?czuckie
11/08/2022, 11:14 PMPHondogo
11/09/2022, 5:46 AMczuckie
11/09/2022, 8:14 AMBox(modifier = Modifier.size(200.dp, 200.dp) {}
Then inside that, I'd have each of my vertex (which might even just be a Text
with a background.)
I'd set a Modifier.offset
on each vertex and also a Modifier.onGlobalLayout...
thing, I forget the exact name, but from that, I'll be able to get the position of each node in the box and I'll be able to add a Modifier.drawWithContent {}
to the Box
which would draw the lines and then the Text
composables.
By adding Modifier.draggable
to each node (potentially twice for each orientation), I'd update the offsets as a result of the dragging.czuckie
11/09/2022, 8:15 AMMichael Paus
11/09/2022, 11:02 AMPHondogo
11/09/2022, 11:08 AMMichael Paus
11/09/2022, 11:10 AMMichael Paus
11/09/2022, 11:12 AMPHondogo
11/09/2022, 11:14 AMMichael Paus
11/09/2022, 11:15 AM