Skip to content

Commit

Permalink
Fix #1051: vjust on livemap.
Browse files Browse the repository at this point in the history
  • Loading branch information
OLarionova-HORIS committed Mar 20, 2024
1 parent 999952d commit a1c1066
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions future_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- livemap: when release the mouse button from outside the map, it gets stuck in panning mode [[#1044](https://github.com/JetBrains/lets-plot/issues/1044)].
- Incorrect 'plot_background' area (with empty space capture) [[#918](https://github.com/JetBrains/lets-plot/issues/918)].
- Support arrow() in geom_spoke() [[#986](https://github.com/JetBrains/lets-plot/issues/986)].
- Livemap: `vjust` implemented incorrectly [[#1051](https://github.com/JetBrains/lets-plot/issues/1051)].
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class TextRenderer : Renderer {
} else {
val yPosition = with(textSpec) {
when (vjust) {
1.0 -> font.fontSize * 0.7
0.0 -> -textSize.y + font.fontSize
0.0 -> font.fontSize * 0.7
1.0 -> -textSize.y + font.fontSize
else -> -textSize.y / 2 + font.fontSize * 0.8
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TextSpec(
val height = textSize.y + padding * 2
rectangle = DoubleRectangle(
-width * hjust,
-height * (1 - vjust),
-height * vjust,
width,
height
)
Expand Down

0 comments on commit a1c1066

Please sign in to comment.