Sha256: ed878b0fb456ca0378fd97d826ca92207bb95a3babed37686c3951fb928473d0

Contents?: true

Size: 784 Bytes

Versions: 81

Compression:

Stored size: 784 Bytes

Contents

#  frozen_string_literal: true



dragged = box({ left: 33,top: 333, width: 333,color: :orange, smooth: 6, id: :drop_zone })

dragged.drop(true) do |event|
  grab(event[:destination]).color(:white)
  grab(event[:source]).color(:black)
end

dragged.drop(:enter) do |event|
  grab(event[:destination]).color(:red)
end

dragged.drop(:leave) do |event|
  grab(event[:destination]).color(:gray)
end

dragged.drop(:activate) do |event|
  grab(event[:destination]).color(:yellow)
  grab(event[:source]).color(:cyan)
end


dragged.drop(:deactivate) do |event|
  grab(event[:destination]).color(:orange)
end
box({ left: 333, color: :blue,top: 222, smooth: 6, id: :the_box, drag: true })

t=text({data: 'touch me to unbind drop enter'})
t.touch(true) do
  dragged.drop({ remove: :enter })
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
atome-0.5.7.5.4 vendor/assets/application/examples/drop.rb
atome-0.5.7.5.3 vendor/assets/application/examples/drop.rb
atome-0.5.7.5.1 vendor/assets/application/examples/drop.rb
atome-0.5.7.4.8 vendor/assets/application/examples/drop.rb
atome-0.5.7.4.7 vendor/assets/application/examples/drop.rb
atome-0.5.7.4.6 vendor/assets/application/examples/drop.rb
atome-0.5.7.4.3 vendor/assets/application/examples/drop.rb
atome-0.5.7.4.2 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.9 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.6 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.5 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.3 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.2 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.1 vendor/assets/application/examples/drop.rb
atome-0.5.7.3.0 vendor/assets/application/examples/drop.rb
atome-0.5.7.1.8 vendor/assets/application/examples/drop.rb
atome-0.5.7.1.7 vendor/assets/application/examples/drop.rb
atome-0.5.7.1.0 vendor/assets/application/examples/drop.rb
atome-0.5.7.0.7 vendor/assets/application/examples/drop.rb
atome-0.5.7.0.5 vendor/assets/application/examples/drop.rb