ashbb / green_shoes

Green Shoes is one of the colorful Shoes written in pure Ruby.
Other
204 stars 37 forks source link

hover and leave at the same time #61

Closed athom closed 12 years ago

athom commented 12 years ago

when I move my mouse on the picture, the console puts the message "h" and "l" endless. seems the event hover and leave happen at the same time. is that a bug? if not, how to change the code to avoid this?

require 'green_shoes'

Shoes.app :width => 360 do
    flow do 
        @st=stack :width => 60, :margin_left => 100 do 
            @img = image 'ruby2.png'
        end
    end

    @img.hover do |s|
        puts 'h'
        s.path = 'ruby3.png'
    end

    @img.leave do |s|
        puts 'l'
        s.path = 'ruby2.png'
    end
end
ashbb commented 12 years ago

Oh, you found a bug! Thank you for opening this ticket. Now, fixed.

https://github.com/ashbb/green_shoes/commit/cad38689a5c39a849818506f7ff554bc3e087d2a

athom commented 12 years ago

quick action! :)