On Fri, 12 May 2023 17:19:29 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> I think it's probably not worth doing. When the application developer sets 
> snapping off when it's on by default, they do it for a reason, so the current 
> behavior is the right one. May be they want to smooth some transition during 
> animation (a-la scrolling ticker tape), who knows.
> 
> FX gives this choice at per-Region basis for this kind of flexibility, 
> otherwise there would be one global setting, right?

For sure it shouldn't be a global setting, and the per Region choice seems 
absolutely the right one. What I was talking about is more how sensible it 
would be for children of an unsnapped Region to still use snapping logic, and 
if it shouldn't work similar to how visibility works (ie. if a parent is 
invisible, all its children are invisible, regardless of those children's 
individual visible status). 

If the scrolling ticker tape you mentioned contains any other children, the 
user probably wants snapping off for those as well as the ticker tape would 
otherwise not be as smooth as it could be; if the parent region is misaligned, 
all the children (if snapped) would still advance by an exact multiple of 
pixels, but they would always fall in the same spot between pixels.  Also, if 
the speed is not a nice pixel multiple (ie. 4.5 pixels per frame) then the 
children would sometimes move 4 pixels, sometimes 5.

It's not truly a big issue, just something that may be unexpected.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/910#discussion_r1192685485

Reply via email to