Sha256: 72912bb9e114f5961da3fdbdebf047ff9d5840526b7bb27cc8650ada21329b6d
Contents?: true
Size: 815 Bytes
Versions: 2
Compression:
Stored size: 815 Bytes
Contents
# alignment box({atome_id: :the_box,color: :orange, width: :auto, height: :auto,xx: 69, x: 69, yy: 69, y: 69}) t=text({content: "click the grey to get it's position", color: :red }) b=box({atome_id: :toto, drag: true}) b.xx(88) b.y(88) b.touch do t.content("x: #{b.x}, y: #{b.y}, xx: #{b.xx}, yy: #{b.yy}") b.fixed(false) end b2 = box({atome_id: :toto, drag: true, color: :purple}) c = circle({y: 96,x: 33, atome_id: :the_circle, color: :magenta, drag: true}) c.center(:y) b2.fixed(true) b2.center(:all) t1 = b2.text('O') t2 = c.text("i") t1.center({reference: :parent, axis: :x}) t2.center({reference: :the_circle, axis: :all}) img=image({content: :boat, size: 69, x: 96, y: 33, drag: true}) # offset means that the current x and y position is added to the centering img.center({axis: :x, offset: true})
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
atome-0.4.7.0 | vendor/assets/build/medias/rubies/examples/Old_examples/alignment.rb |
atome-0.4.5.4 | vendor/assets/build/medias/rubies/examples/Old_examples/alignment.rb |