Sha256: 88ac98828ea674fa4137b4547f1ea00924a566d448e534345b9f9f65040994d1

Contents?: true

Size: 659 Bytes

Versions: 3

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true

b = box({ id: :the_container, width: 300, height: 300 })
b.box({ top: 500, color: :red })
cc = b.circle({ top: 160, id: :the_circle })

initial_height = cc.height
initial_width = cc.width
b.overflow(:scroll) do |event|
  new_height = initial_height + event[:top]
  cc.height(new_height)
  { left: event[:top] }
end
c = circle({ top: 370, color: :red })
c.touch(:up) do
  b.overflow(:remove)
  c.delete(true)
  c = circle({ top: 370, left: 90, color: :green })
  c.touch(true) do
    b.overflow(:scroll) do |event|
      puts 'removed!!'
      new_width = initial_width + event[:top]
      cc.width(new_width)
    end
  end
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/overflow/example.rb
atome-0.5.7.6.0 vendor/assets/application/examples/overflow.rb
atome-0.5.7.5.9 vendor/assets/application/examples/overflow.rb