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

browser zoom #51

Closed
mike-aungsan opened this issue Nov 26, 2012 · 13 comments · Fixed by #213
Closed

browser zoom #51

mike-aungsan opened this issue Nov 26, 2012 · 13 comments · Fixed by #213
Assignees
Labels
Milestone

Comments

@mike-aungsan
Copy link

When browser zoom, the chart does not render, correctly,

Please have a look demo page with various zoom of the browser such as 110%, 120%, 130%....

Thanks.

@mleden
Copy link

mleden commented Feb 21, 2013

Hi Mike,

I initially thought that this was a problem, too. However, on further analysis I think this is actually the result of anomalies within the browser implementation of the zoom feature. For example, on WinXP and Google Chrome, I see what appear to be mis-alignments within the plugin UI as I used the browser zoom feature. However, as I progress up to 200% and 300% those "mis-alignments" correct themselves. I see the same thing in both the jQuery Gantt demo and my own implementation using the plugin. Perhaps what we are seeing is related to rounding in the zoom algorithms? I also tried to actually cleanup/simplify the CSS and grid rendering logic of the plugin, but I eventually gave up.

-Mark

@mike-aungsan
Copy link
Author

Yes I did tried various way. What about using actual table rather then
using png grid ?

@usmonster
Copy link
Collaborator

Duplicate of #36, possibly related to #32.

@usmonster
Copy link
Collaborator

@mike-aungsan , @mleden, is this an issue specific to chrome, as described in #32? Do you still see the issue when using the current version on master?

@mleden
Copy link

mleden commented Jul 19, 2013

The issue can be easily reproduced on either Chrome or FF as follows:

  1. Open browser and navigate to the jQuery Gantt "demo" page of:
    http://taitems.github.io/jQuery.Gantt/
  2. Use browser zoom feature to zoom in 4 times
    Expected:
    Gridlines of gantt chart to remain aligned
    Actual:
    Gridlines are no longer aligned (increasingly misaligned to the right)
    What is interesting, however, is that if you zoom in further to 200% and 300%, the proper alignment seems to return.

@usmonster
Copy link
Collaborator

usmonster commented Nov 4, 2013

Ugh, I think I know what's causing this. I'll try to put in a fix sometime this month, though it might just go away once we switch the CSS box-sizing of the plugin (see #102).

@usmonster usmonster added this to the v1.2.0 milestone Dec 24, 2014
@cormier
Copy link

cormier commented Jan 5, 2015

Hi, I have tested this suggestion by resetting the box-sizing to content-box as suggested in this commit 2666f30
It seems to me that even with this patch the issue persists, at least in my browser (Firefox 32.0.2)

@usmonster
Copy link
Collaborator

@cormier The workaround you reference would not fix the issue (there's more to it), but please follow this and/or #102 for updates.

@cormier
Copy link

cormier commented Jan 16, 2015

@usmonster thanks for the reply and for the information. I'm willing to help and try to implement a fix. You said there's more to it than resetting the box-sizing to content-box: anything specific in mind?
Thanks.

@Guracao
Copy link

Guracao commented Jan 8, 2016

Hi there! I have the same issue as mentioned above. At 100%, 200% and 300% it renders all as it should, everything between is causing the gridlines not longer to be aligned. Just wanted to ask, if theres any progress regarding to this? Thanks in advance!

@Ezyweb-uk
Copy link

Me too on the demo, see #102

@usmonster usmonster self-assigned this Dec 17, 2016
@usmonster
Copy link
Collaborator

@nickwuk (continuing conversation from #102 here) ...it was a combination of CSS and markup fixes, likely done in 5776d00 (along with lots of other stuff). It's still not perfect at certain zoom levels, which is why this issue is still open. Hope this helps!

@usmonster
Copy link
Collaborator

Reopening after accidental auto-close when I merged a partial fix.

The issue now seems to be strictly limited to the background display at specific browser zoom levels, i.e. anything not a multiple of 25. This is because the background image has a fixed-width border, and so it renders poorly at certain scales (e.g. 80%, 90%, 110%, ...).

This can probably be solved by changing how the background is rendered, e.g. by using a gradient instead of an image.

@usmonster usmonster reopened this Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants