From 9e7f27c60a425e2baa67cd459d8509a43b1d123d Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 8 Aug 2023 10:40:52 +0200 Subject: Update to brr 0.0.6 --- script.it/script.ml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'script.it/script.ml') diff --git a/script.it/script.ml b/script.it/script.ml index fffc589..5fb4e5c 100755 --- a/script.it/script.ml +++ b/script.it/script.ml @@ -1,7 +1,7 @@ open StdLabels open Note open Brr -open Brr_note +open Note_brr module State = Script_state.State module Selection = Script_state.Selection module Path = Script_path @@ -40,21 +40,21 @@ let canva : (* Mouse events *) let mouse = - Brr_note_kit.Mouse.on_el ~normalize:false (fun x y -> (x, y)) element + Note_brr_kit.Mouse.on_el ~normalize:false (fun x y -> (x, y)) element in let click = - Brr_note_kit.Mouse.left_down mouse |> E.map (fun c -> `MouseDown c) + Note_brr_kit.Mouse.left_down mouse |> E.map (fun c -> `MouseDown c) in - let up = Brr_note_kit.Mouse.left_up mouse |> E.map (fun c -> `Out c) in + let up = Note_brr_kit.Mouse.left_up mouse |> E.map (fun c -> `Out c) in - let position = Brr_note_kit.Mouse.pos mouse in + let position = Note_brr_kit.Mouse.pos mouse in let pos = S.l2 (fun b pos -> if b then Some pos else None) - (Brr_note_kit.Mouse.left mouse) + (Note_brr_kit.Mouse.left mouse) position in @@ -361,13 +361,14 @@ let page_main id = let my_host = Uri.host @@ Window.location @@ G.window in (if Hashtbl.hash my_host = Blog.Hash_host.expected_host then - let target = Brr_webworkers.Worker.as_target worker in - let _ = - Ev.listen Brr_io.Message.Ev.message - (fun t -> Ev.as_type t |> Brr_io.Message.Ev.data |> worker_send) - target - in - ()); + let target = Brr_webworkers.Worker.as_target worker in + let _ = + Ev.listen Brr_io.Message.Ev.message + (fun t -> + Ev.as_type t |> Brr_io.Message.Ev.data |> worker_send) + target + in + ()); (* Add the events to the canva : -- cgit v1.2.3