first version to add new boxes dynamically

This commit is contained in:
Danny Yoo 2012-06-24 18:41:01 -04:00
parent 2f90adf7fc
commit aa57c8f378
2 changed files with 3 additions and 2 deletions

View File

@ -44,10 +44,10 @@
(view-append-child v (view-append-child v
(xexp->dom `(span (@ (class "box") (xexp->dom `(span (@ (class "box")
(id ,(box-id a-box)) (id ,(box-id a-box))
(style ,(format "position: relative; left: ~apx; top: ~apx" (style ,(format "position: absolute; left: ~apx; top: ~apx"
(box-x a-box) (box-x a-box)
(box-y a-box)))) (box-y a-box))))
"I am a box")))])) "box")))]))
(view-focus v "playground") (view-focus v "playground")
w)) w))

View File

@ -5,6 +5,7 @@
width: 500px; width: 500px;
height: 500px; height: 500px;
display: block; display: block;
position: relative;
} }