Skip to content

Commit

Permalink
Fix scale in layoutable
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Jun 5, 2024
1 parent 46ae1b0 commit dc1d20b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layoutable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function Makie.initialize_block!(l::LTeX)
layoutobservables.autosize[] = (autowidth, autoheight)
end

onany(layoutobservables.computedbbox, l.padding) do bbox, padding
onany(layoutobservables.computedbbox, l.padding, l.scale) do bbox, padding, _scale

tw = Makie.width(textbb[])
th = Makie.height(textbb[])
Expand All @@ -77,7 +77,7 @@ function Makie.initialize_block!(l::LTeX)
ty = boy + padding[3] + 0.5 * th

textpos[] = [Makie.Point3f(tx, ty, 0)]
scale[] = [(bbox.widths ./ textbb[].widths)]
scale[] = [(bbox.widths ./ textbb[].widths) .* _scale]
end


Expand Down

0 comments on commit dc1d20b

Please sign in to comment.