Sha256: 349daf1356a25e07641f9292384025e4b87743c1c7bbfb3c090f9378de96b48f

Contents?: true

Size: 1.09 KB

Versions: 45

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

t = text({ data: 'touch me to select all', id: :the_text })
b = box({ left: 12, id: :the_box })
circle({ left: 230, id: :the_circle })
image({ path: 'medias/images/red_planet.png', id: :the__red_planet, top: 233 })

t.touch(true) do
  puts "1 current_user - #{grab(Universe.current_user).selection}"
  puts "1 - b selected : #{b.selected}"
  grab(:view).attached.each do |atome_found|
    grab(atome_found).selected(true)
  end
  puts "2 - current_user : #{grab(Universe.current_user).selection}"
  puts "2 - b selected : #{b.selected}"
  selected_items = grab(Universe.current_user).selection # we create a group

  selected_items.each do |atome_id_selected|
    atome_selected=grab(atome_id_selected)
    atome_selected.width=rand(333)
    atome_selected.height=rand(333)

  end
  b.selected(false)
  puts "3 current_user- #{grab(Universe.current_user).selection}"
  puts "3 - b selected : #{b.selected}"

  grab(Universe.current_user).selection.color(:red)
  grab(Universe.current_user).selection.each do |el|
    puts el
  end
  puts grab(Universe.current_user).selection.collect
end


Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
atome-0.5.7.0.3 vendor/assets/application/examples/selected.rb
atome-0.5.7.0.2 vendor/assets/application/examples/selected.rb
atome-0.5.6.8.7 vendor/assets/application/examples/selected.rb
atome-0.5.6.8.6 vendor/assets/application/examples/selected.rb
atome-0.5.6.8.5 vendor/assets/application/examples/selected.rb
atome-0.5.6.8.3 vendor/assets/application/examples/selected.rb
atome-0.5.6.7.8 vendor/assets/application/examples/selected.rb
atome-0.5.6.7.7 vendor/assets/application/examples/selected.rb
atome-0.5.6.7.6 vendor/assets/application/examples/selected.rb
atome-0.5.6.7.5 vendor/assets/application/examples/selected.rb
atome-0.5.6.7.4 vendor/assets/application/examples/selected.rb
atome-0.5.6.7.3 vendor/assets/application/examples/selected.rb
atome-0.5.6.6.9 vendor/assets/application/examples/selected.rb
atome-0.5.6.6.7 vendor/assets/application/examples/selected.rb
atome-0.5.6.6.5 vendor/assets/application/examples/selected.rb
atome-0.5.6.6.1 vendor/assets/application/examples/selected.rb
atome-0.5.6.6.0 vendor/assets/application/examples/selected.rb
atome-0.5.6.5.7 vendor/assets/application/examples/selected.rb
atome-0.5.6.5.6 vendor/assets/application/examples/selected.rb
atome-0.5.6.5.4 vendor/assets/application/examples/selected.rb