Skip to content

Commit

Permalink
klighd: fixed inset calculation.
Browse files Browse the repository at this point in the history
Previously insets were calculated wrong by offsetting all insets too
much when renderings were inside renderigns with offsets. For the server
this is an invisible fix, as all Piccolo-related rendering code do not
directly use these insets, LSP rendering however directly use the insets
for Sprotty, which are now fixed.
  • Loading branch information
NiklasRentzCAU committed Mar 15, 2023
1 parent 9b231e1 commit 721bf2f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,9 @@ public static void calculateInsets(final KRendering rootRendering, final KInsets
if (currentRendering instanceof KContainerRendering) {
currentParent = (KContainerRendering) currentRendering;
currentBounds = bounds;
// Reset current position to avoid adding top/left insets multiple times.
currentBounds.x = 0;
currentBounds.y = 0;
}
}

Expand Down

0 comments on commit 721bf2f

Please sign in to comment.