From 329b774e315b41bc0d5b7daf8737222768c8d1f3 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sat, 9 Jan 2021 11:35:40 +0100 Subject: Formalized exchanges between worker and app --- script.it/script.ml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'script.it/script.ml') diff --git a/script.it/script.ml b/script.it/script.ml index ca831ba..3133269 100755 --- a/script.it/script.ml +++ b/script.it/script.ml @@ -4,14 +4,6 @@ open Brr open Brr_note -module Mouse = Brr_note_kit.Mouse - -let get_height el = - match El.at (Jstr.v "height") el with - | None -> 0 - | Some att -> - Option.value ~default:0 (Jstr.to_int att) - (** Create the element in the page, and the event handler *) let canva : Brr.El.t -> [> State.canva_events] Note.E.t * (float * float) option Note.S.t * Brr_canvas.Canvas.t @@ -60,14 +52,14 @@ let canva Brr_note_kit.Mouse.left_up mouse |> E.map (fun c -> `Out c) in - let position = Mouse.pos mouse in + let position = Brr_note_kit.Mouse.pos mouse in let pos = S.l2 (fun b pos -> if b then Some pos else None - ) (Mouse.left mouse) position in + ) (Brr_note_kit.Mouse.left mouse) position in E.select [click; up], pos, c @@ -293,15 +285,6 @@ let on_change canva mouse_position timer state = ~w:10. ~h:10. context; - -(* - Cd2d.stroke_text - context - (Jstr.of_float @@ Path.Point.get_stamp point) - ~x:(x +. 15.) - ~y; -*) - | _ -> () in -- cgit v1.2.3