Skip to content

Commit

Permalink
add resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Jul 24, 2024
1 parent 656300d commit 08d0f5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/shared/src/main/scala/viz/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ object Utils:
spec("axes") = tmp
end apply

val resize: ujson.Value => Unit = (spec: ujson.Value) =>
spec("autosize") = ujson.Obj("resize" -> true, "contains" -> "padding", "type" -> "fit")

val fillDiv: ujson.Value => Unit =
(spec: ujson.Value) =>
spec.obj.remove("height")
Expand Down

0 comments on commit 08d0f5d

Please sign in to comment.