Commit d6bd354b authored by Benoît Barbot's avatar Benoît Barbot
Browse files

improve_layout

parent 6ecf231b
......@@ -467,7 +467,7 @@ let rec html_of_attr s attr nattr cb =
td [ color_input ~on_change:(callback id v) str ];
td [delbutton]]
) attr in
let new_attr = tr [td [choice_input ~init_value:(Some "New Attribute") ~on_change:(fun x ->cb x) nattr]; td [] ] in
let new_attr = tr [td ~colspan:2 [choice_input ~init_value:(Some "New Attribute") ~on_change:(fun x ->cb x) nattr]; td []; ] in
(attr_tr @ (if nattr<>[] then [new_attr] else []))
and set_selected s sobj mouse_pos=
......
......@@ -26,9 +26,12 @@ let tr ?id items =
List.iter (append_node tr) items;
(tr :> t)
let td ?id items =
let td ?colspan ?id items =
let td = Dom_html.(createTd document) in
(match id with None -> () | Some ids -> td##.id := Js.string ids);
(match id with None -> () | Some ids -> td##.id := Js.string ids);
(match colspan with
Some x -> td##.colSpan := x
| None -> ());
List.iter (append_node td) items;
(td :> t)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment