Sha256: ccd9debea5dd5aa00b00c3a3737fd7617e8a53134f882f67812c5f8d3161682d

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

# touch stop_event example

b = box
c = b.circle({size: 30, center: true})

b.touch({ option: :down, stop: true }) do
  if b.width== 333
    b.width(66)
    b.color(:white)
  else
    b.color(:black)
    b.width(333)
  end
end

# stop option stop the propagation of the event
c.touch(option: :down, stop: true) do
  # b.color(:blue)

  if b.width== 333
    c.width(66)
    c.color(:orange)
  else
    c.color(:yellow)
    c.width(333)
  end
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/touch_stop_propagation.rb
atome-0.4.5.4 vendor/assets/build/medias/rubies/examples/Old_examples/touch_stop_propagation.rb