Sha256: 8f98ab37a6a5fb97af84378930623dd9d8f5226c8cca24de31fbd65a90403dd4

Contents?: true

Size: 777 Bytes

Versions: 18

Compression:

Stored size: 777 Bytes

Contents

#  frozen_string_literal: true

b = box({ left: 666, color: :blue, smooth: 6, id: :the_box2 })

t=text({id: :the_text, data: 'type of touch : ?'})

t.touch(:down) do |event|

  puts event[:pageX]
  puts event[:pageY]
  b.touch({remove: :down})
   # b.touch(:remove) # or  b.touch(false) to remove all touches bindings
  t.data('touch down killed')
end
b.touch(true) do
  # t.data('type of touch : ?')
  b.color(:red)
  puts 'box tapped'
end

b.touch(:long) do
  t.data('type of touch is : long ')
  b.color(:black)
end

b.touch(:up) do

  t.data('type of touch is : up ')
  b.color(:orange)
end

b.touch(:down) do
  t.data('type of touch is : down ')
  b.color(:white)
end

b.touch(:double) do
  t.color(:red)
  t.data('type of touch is : double ')
  b.color(:yellowgreen)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
atome-0.5.7.0.7 vendor/assets/application/examples/touch.rb
atome-0.5.7.0.5 vendor/assets/application/examples/touch.rb
atome-0.5.7.0.4 vendor/assets/application/examples/touch.rb
atome-0.5.7.0.3 vendor/assets/application/examples/touch.rb
atome-0.5.7.0.2 vendor/assets/application/examples/touch.rb
atome-0.5.6.8.7 vendor/assets/application/examples/touch.rb
atome-0.5.6.8.6 vendor/assets/application/examples/touch.rb
atome-0.5.6.8.5 vendor/assets/application/examples/touch.rb
atome-0.5.6.8.3 vendor/assets/application/examples/touch.rb
atome-0.5.6.7.8 vendor/assets/application/examples/touch.rb
atome-0.5.6.7.7 vendor/assets/application/examples/touch.rb
atome-0.5.6.7.6 vendor/assets/application/examples/touch.rb
atome-0.5.6.7.5 vendor/assets/application/examples/touch.rb
atome-0.5.6.7.4 vendor/assets/application/examples/touch.rb
atome-0.5.6.7.3 vendor/assets/application/examples/touch.rb
atome-0.5.6.6.9 vendor/assets/application/examples/touch.rb
atome-0.5.6.6.7 vendor/assets/application/examples/touch.rb
atome-0.5.6.6.5 vendor/assets/application/examples/touch.rb