first version to add new boxes dynamically
This commit is contained in:
parent
2f90adf7fc
commit
aa57c8f378
|
@ -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))
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
width: 500px;
|
width: 500px;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
display: block;
|
display: block;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user