GameOfLife / Unit-Lib

The Unit Library is a system that provides high level abstractions on top of the SuperCollider language.
25 stars 6 forks source link

clicking event tends to move it even with just a single click #6

Closed miguel-negrao closed 11 years ago

woutersnoei commented 11 years ago

Huh, can't reproduce. Do you have an example score where this happens? It should only move if the mouse moves more than a certain amount (3 pixels I think).

miguel-negrao commented 11 years ago

For example it happens very easily on this one:

UScore(*[
    UChain(28.25, 6.0, 640.808, 'sine', [ 'output', [ 'u_fadeIn', 1.0, 'u_fadeOut', 1.0 ] ]), 
    UChain(548.25, 7.0, 640.808, 'sine', [ 'output', [ 'u_fadeIn', 1.0, 'u_fadeOut', 1.0 ] ]), 
    UChain(1074.25, 8.0, 640.808, 'sine', [ 'output', [ 'u_fadeIn', 1.0, 'u_fadeOut', 1.0 ] ])])

I think it might be related with the events being very long ?

woutersnoei commented 11 years ago

got it, fixed in commit

miguel-negrao commented 11 years ago

Ah, yes, and the bug was in my code... thanks for fixing !

woutersnoei commented 11 years ago

The bug seems to have been there from the beginning. After I fixed it I noticed that it actually caused a bit uncomfortable behavor when dragging events around, so I changed the implementation a bit. Now it will lock the horizontal position until more than 3px of x movement has been detected, and then keep it free after that.