Sha256: 50cd264d87e73e6b5e01a832b4f866ad4835dd7d72e7ecc3bef9ef440917ba1b
Contents?: true
Size: 632 Bytes
Versions: 2
Compression:
Stored size: 632 Bytes
Contents
# dynamic centering example b = box({ width: 700, height: 120, drag: true, center: { dynamic: true } }) c = circle({y:33}) c.text({content: "activate dynamic 'continuous' centering", color: :white}) t2=text({content: "remove dynamic centering on box", color: :white, y: 0}) t = text({ content: "ok", color: :white, center: :x , y: 69}) c.touch do grab(:buffer).content[:resize] = [t, b] ATOME.resize_html do |evt| t.content("#{evt[:width]} #{evt[:height]}") grab(:buffer).content[:resize].each do |element| element.center=element.center end end end t2.touch do grab(:buffer).content[:resize] = [t] end
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/center.rb |
atome-0.4.5.4 | vendor/assets/build/medias/rubies/examples/Old_examples/center.rb |