package memtrace_viewer
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Interactive memory profiler based on Memtrace
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=0d9b7ddf94f9cf090930a36468abd4f4ca40c5618ec02dbbc6fd47fb0572433d
doc/src/memtrace_viewer.client/window_size.ml.html
Source file window_size.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26open! Core open! Bonsai_web type t = { width : int ; height : int } [@@deriving equal, sexp] let get () = let open Js_of_ocaml in let width = Dom_html.window##.innerWidth in let height = Dom_html.window##.innerHeight in { width; height } ;; let window_size = Bonsai.Var.create (get ()) let update_window_size () = Bonsai.Var.set window_size (get ()) let component = let open Bonsai.Let_syntax in let%sub () = Bonsai.Edge.after_display (Value.return (Effect.of_sync_fun update_window_size ())) in return (Bonsai.Var.value window_size |> Bonsai.Value.cutoff ~equal) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>