-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Sidebar doesn't unfold when zoomed in #298
Comments
Thank you for the report. There is a reason we have the bug report template, however, as it helps us to confirm, debug, etc., knowing what version you are using, etc. If you need help finding the information, let us know. |
I updated the post with the requested info. |
Thanks! I get decent-seeming behavior (including for zoom less than 100%) when changing to this to take into account the zoom through const toggleSidePanel = function (close) {
const dpr = window.devicePixelRatio || 1;
const w = $('#sidepanels').width();
const isOpened = (dpr < 1 ? w : w / dpr) > 2;
const zoomAdjustedSidepanelWidth = (dpr < 1 ? 1 : dpr) * SIDEPANEL_OPENWIDTH;
const deltaX = (isOpened || close ? 0 : zoomAdjustedSidepanelWidth) - w;
changeSidePanelWidth(deltaX);
}; I changed the 2nd "2" to "0" as I don't see why we should be changing the value at all if we determined it is already open/closed, and it seems fine. Let me know if these changes work for you... |
When zoomed in, clicking on the "Layers" button doesn't open the sidebar.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The sidebar should open and show the layer settings.
SVG-Edit environment
svg-editor-es.html
Desktop:
Additional context
Reason is that the pixes are zoomed in,
$('#sidepanels').width()
returns 2.25, while the check is done on 2.See svg-editor.js line 4977
I don't know enough about the code structure on where to keep the state (whether the bar is considered open or not). Apparently deducing it from the HTML style doesn't always work.
The text was updated successfully, but these errors were encountered: