Sha256: 89af5235b6fe6b1eeb4284f5321eab1a2eba3894d71b8d7b1a9183ce97b9e7f6

Contents?: true

Size: 738 Bytes

Versions: 3

Compression:

Stored size: 738 Bytes

Contents

# frozen_string_literal: true

a = box({ width: 333, height: 333, id: :the_boxy })
a.color(:red)
b = box({ width: 33, height: 33, id: :the_box, drag: true })
b.parents([a.id.value])
b.color(:black)
# b.parents([:the_boxy ])
b.drag({ move: true }) do |e|
  puts e
end

# b.drag({ move: false}) do |e|
#   puts e
# end


b.drag({ start: true}) do |e|
  b.color(:yellow)
end

b.drag({ end: true}) do |e|
  b.color(:orange)
end

# b.drag({ inertia: true })

# b.drag({ lock: :start })

b.drag({ lock: :x })

# b.drag({ remove: true })
# b.drag({ remove: false })

# b.drag({ snap: { x: 100, y: 190 } })

# b.drag({ constraint: { top: 330, left: 30, bottom: 30, right: 1 } })
b.drag({ constraint: :parent })
# b.drag({ constraint: :the_boxy })

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
atome-0.5.2.8 vendor/assets/src/medias/rubies/examples/drag.rb
atome-0.5.2.7 vendor/assets/build/medias/rubies/examples/drag.rb
atome-0.5.2.5 vendor/assets/build/medias/rubies/examples/drag.rb