aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-01-02 13:15:31 +0100
committerSébastien Dailly <sebastien@chimrod.com>2021-01-02 13:15:31 +0100
commit3d3ac5d05cf2851444b835b5bbc0236111f53673 (patch)
tree6bd04bec178f9469e06277920aaa07bcf2d10956
parent7bb561f31e0ee57a388032b760b7db943dd6b36c (diff)
Update
-rwxr-xr-xscript.ml12
-rwxr-xr-xstate.ml7
2 files changed, 8 insertions, 11 deletions
diff --git a/script.ml b/script.ml
index 398e4f2..3e52f5c 100755
--- a/script.ml
+++ b/script.ml
@@ -111,7 +111,6 @@ let set_sidebar
; v (Jstr.v "min") (Jstr.v "1")
; v (Jstr.v "max") (Jstr.v "50")
; At.value (Jstr.of_float state.width)
- ; id (Jstr.v "nib_size")
] in
let width = El.div [] in
@@ -142,8 +141,6 @@ let set_sidebar
)
);
-
- let br = El.br () in
let render =
El.select
[ El.option ~at:At.[value (Jstr.v "Fill")]
@@ -153,12 +150,18 @@ let set_sidebar
; El.option ~at:At.[value (Jstr.v "Ductus")]
[ txt' "Ductus"]
] in
+ let rendering' = El.div
+ [ txt' "Rendering : "
+ ; render ] in
let () =
El.append_children element
[ hr ()
; delete
; export
+
+ ; rendering'
+
; hr ()
; width
@@ -167,9 +170,6 @@ let set_sidebar
; angle
; input_angle
- ; br
- ; render
-
]
in
delete_event, angle_event, nib_size_event, export_event
diff --git a/state.ml b/state.ml
index 52fe5a6..5a1ef8f 100755
--- a/state.ml
+++ b/state.ml
@@ -12,9 +12,6 @@ type mode =
| Selection of int
| Out
-type current = Path.Path_Builder.t
-
-
(** Events *)
type canva_events =
[ `Click of float * float
@@ -41,7 +38,7 @@ type events =
type state =
{ mode : mode
; paths : Path.Fixed.t list
- ; current : current
+ ; current : Path.Path_Builder.t
; width : float
; angle : float
}
@@ -97,7 +94,7 @@ let update_selection id state f =
| false -> path
| true -> Path.Fixed.map_point path f
) in
- { state with paths}
+ { state with paths }
let do_action
: events -> state -> state