Sha256: 6015e338839e014e97609678cc94fcbe4f0093392974347fd47b8317a4fdbe2b

Contents?: true

Size: 735 Bytes

Versions: 3

Compression:

Stored size: 735 Bytes

Contents

#  frozen_string_literal: true

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

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

t.touch(:down) do |event|
  puts :down
  puts event[:pageX]
  puts event[:pageY]
  b.touch({ remove: :down })
  t.data('down removed !! ')
end

touch_code = lambda do
  b.color(:red)
  puts 'box tapped'
end
b.touch(tap: true, code: touch_code)

b.touch(:long) do
  { color: :cyan }
  t.data('type of touch is : long ')
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

3 entries across 3 versions & 1 rubygems

Version Path
atome-0.5.7.6.5 vendor/assets/src/medias/utils/examples/particles/touch/example.rb
atome-0.5.7.6.0 vendor/assets/application/examples/touch.rb
atome-0.5.7.5.9 vendor/assets/application/examples/touch.rb