Sha256: 1470263972a3eaddcd1bb3c272605ecc45ab0fca1d8ffb8a67663c8fd9d0bab9

Contents?: true

Size: 737 Bytes

Versions: 4

Compression:

Stored size: 737 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({ constraint: { top: 330, left: 30, bottom: 30, right: 1 } })
b.drag({ constraint: :parent })
b.drag({ snap: { x: 100, y: 190 } })

# b.drag({ constraint: :the_boxy })

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
atome-0.5.3.7.3 vendor/assets/src/medias/rubies/examples/drag.rb
atome-0.5.3.7.2 vendor/assets/src/medias/rubies/examples/drag.rb
atome-0.5.3.4 vendor/assets/src/medias/rubies/examples/drag.rb
atome-0.5.3.2 vendor/assets/src/medias/rubies/examples/drag.rb