summaryrefslogtreecommitdiff
path: root/script.it/script.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-01-09 11:35:40 +0100
committerSébastien Dailly <sebastien@chimrod.com>2021-01-09 11:35:40 +0100
commit329b774e315b41bc0d5b7daf8737222768c8d1f3 (patch)
tree94464c12dfa48d5fdb1508b9e8a115b4596d0e34 /script.it/script.ml
parentc734c1b30fd1c58a0d42020859be31d89b92bcd0 (diff)
Formalized exchanges between worker and app
Diffstat (limited to 'script.it/script.ml')
-rwxr-xr-xscript.it/script.ml21
1 files changed, 2 insertions, 19 deletions
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