File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
app/src/main/kotlin/com/kitabu/app/ui/graph Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -90,17 +90,16 @@ class GraphView @JvmOverloads constructor(
9090
9191 private suspend fun startLayout (w : Float , h : Float ) {
9292 val layoutNodes = withContext(Dispatchers .Default ) {
93- val localNodes = nodes.map { it.copy() }.toMutableList()
94- layoutNodesInternal(localNodes, w, h)
95- localNodes
96- }
97- layoutNodes.forEach { src ->
98- nodes.firstOrNull { it.id == src.id }?.let { dest ->
99- dest.x = src.x; dest.y = src.y
100- }
93+ val localNodes = nodes.map { it.copy() }.toMutableList()
94+ layoutNodesInternal(localNodes, w, h)
95+ localNodes
96+ }
97+ layoutNodes.forEach { src ->
98+ nodes.firstOrNull { it.id == src.id }?.let { dest ->
99+ dest.x = src.x; dest.y = src.y
101100 }
102- invalidate()
103101 }
102+ invalidate()
104103 }
105104
106105 override fun onDetachedFromWindow () {
You can’t perform that action at this time.
0 commit comments