diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2023-08-08 10:40:52 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2023-08-08 10:40:52 +0200 |
commit | 9e7f27c60a425e2baa67cd459d8509a43b1d123d (patch) | |
tree | 53d79526c3a665e077ce85d8ea48a2ac3fcb07ff /script.it | |
parent | e4f50f8df6e4bc72664b0e5fc2f054694c038973 (diff) |
Update to brr 0.0.6
Diffstat (limited to 'script.it')
-rwxr-xr-x | script.it/script.ml | 27 | ||||
-rwxr-xr-x | script.it/state/dune | 2 |
2 files changed, 15 insertions, 14 deletions
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 : diff --git a/script.it/state/dune b/script.it/state/dune index d838c04..cfe6b99 100755 --- a/script.it/state/dune +++ b/script.it/state/dune @@ -2,7 +2,7 @@ (name script_state) (libraries brr - brr.note + note.brr blog application worker_messages |