Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Borders of components flicker on resize #464

Open
cchan987 opened this issue Jul 6, 2015 · 6 comments
Open

Borders of components flicker on resize #464

cchan987 opened this issue Jul 6, 2015 · 6 comments
Assignees

Comments

@cchan987
Copy link
Contributor

cchan987 commented Jul 6, 2015

No description provided.

@jgosmann
Copy link
Collaborator

jgosmann commented Jul 6, 2015

This seems to happen primarily on slower computers (I never noticed it on my Macbook). It appears that the corner does not stay fixed under the mouse pointer. I believe (but might be wrong), that the resize amount is calculated from the relative movement of the mouse (which seems to be either inaccurate or some resize events are missed because the processing is too slow). It might be better to calculate the size based on the absolute mouse coordinates which should always be accurate (fixed aspect ratio elements do it that way). But I am not completely sure that this will elimate all flicker ...

@tcstewar
Copy link
Collaborator

tcstewar commented Jul 6, 2015

Yup, looks to me that it's about the mouse cursor being outside the component, so it's no longer triggering the hover. But it happens on my desktop machine, so it's not about the speed of the computer for me.

I'd say the solution is just to have a "dragging" class that's set during the drag, and use that to set the look rather than the graph:hover thing.

@krisfrenette
Copy link

I would like to have this re-verified to see that this is actually happening to see if is was a bug with browser or a bug with the code. I am on a Mac so if anyone on a windows computer can double check again I would appreciate it.

@jgosmann
Copy link
Collaborator

Does happen on my Mac with Firefox. Not sure whether it is exactly the same issue because I don't think it happens due to performance (though this would correspond to @tcstewar's comment). For specific cursor positions I could make the border disappear for as long as I held the mouse still just now. Might be something that only occurs on high DPI displays due to fractional pixel values.

@jgosmann
Copy link
Collaborator

For some resize operations it is not happening at all, but if it is flickering in one resize operation it is reliable and it is quite easy to find mouse positions where the border stays hidden. I was also able to produce minimal mouse (or actual track pad) movements where the mouse cursor would not move, but the component/graph would shrink by one pixel and lose the border (presumably because it is no longer in hover state than). Seems like some sort of rounding problem in the size calculation.

@krisfrenette
Copy link

Perfect, thanks for adding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants