- Fix: Adjust side panel width checking based on device zoom (fixes #298)
parent
b0fad3d765
commit
ba1f0d7f14
|
@ -1,5 +1,9 @@
|
||||||
# SVG-Edit CHANGES
|
# SVG-Edit CHANGES
|
||||||
|
|
||||||
|
# ?
|
||||||
|
|
||||||
|
- Fix: Adjust side panel width checking based on device zoom (fixes #298)
|
||||||
|
|
||||||
# 4.0.0
|
# 4.0.0
|
||||||
|
|
||||||
- Breaking change (storage preference cookies): Namespace the cookie as
|
- Breaking change (storage preference cookies): Namespace the cookie as
|
||||||
|
|
|
@ -34733,8 +34733,11 @@ editor.init = function () {
|
||||||
|
|
||||||
|
|
||||||
var toggleSidePanel = function toggleSidePanel(close) {
|
var toggleSidePanel = function toggleSidePanel(close) {
|
||||||
|
var dpr = window.devicePixelRatio || 1;
|
||||||
var w = $$b('#sidepanels').width();
|
var w = $$b('#sidepanels').width();
|
||||||
var deltaX = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
var isOpened = (dpr < 1 ? w : w / dpr) > 2;
|
||||||
|
var zoomAdjustedSidepanelWidth = (dpr < 1 ? 1 : dpr) * SIDEPANEL_OPENWIDTH;
|
||||||
|
var deltaX = (isOpened || close ? 0 : zoomAdjustedSidepanelWidth) - w;
|
||||||
changeSidePanelWidth(deltaX);
|
changeSidePanelWidth(deltaX);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -34739,8 +34739,11 @@
|
||||||
|
|
||||||
|
|
||||||
var toggleSidePanel = function toggleSidePanel(close) {
|
var toggleSidePanel = function toggleSidePanel(close) {
|
||||||
|
var dpr = window.devicePixelRatio || 1;
|
||||||
var w = $$b('#sidepanels').width();
|
var w = $$b('#sidepanels').width();
|
||||||
var deltaX = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
var isOpened = (dpr < 1 ? w : w / dpr) > 2;
|
||||||
|
var zoomAdjustedSidepanelWidth = (dpr < 1 ? 1 : dpr) * SIDEPANEL_OPENWIDTH;
|
||||||
|
var deltaX = (isOpened || close ? 0 : zoomAdjustedSidepanelWidth) - w;
|
||||||
changeSidePanelWidth(deltaX);
|
changeSidePanelWidth(deltaX);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5373,8 +5373,11 @@ editor.init = function () {
|
||||||
* @returns {undefined}
|
* @returns {undefined}
|
||||||
*/
|
*/
|
||||||
const toggleSidePanel = function (close) {
|
const toggleSidePanel = function (close) {
|
||||||
|
const dpr = window.devicePixelRatio || 1;
|
||||||
const w = $('#sidepanels').width();
|
const w = $('#sidepanels').width();
|
||||||
const deltaX = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
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);
|
changeSidePanelWidth(deltaX);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34736,8 +34736,11 @@
|
||||||
|
|
||||||
|
|
||||||
var toggleSidePanel = function toggleSidePanel(close) {
|
var toggleSidePanel = function toggleSidePanel(close) {
|
||||||
|
var dpr = window.devicePixelRatio || 1;
|
||||||
var w = $$b('#sidepanels').width();
|
var w = $$b('#sidepanels').width();
|
||||||
var deltaX = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
var isOpened = (dpr < 1 ? w : w / dpr) > 2;
|
||||||
|
var zoomAdjustedSidepanelWidth = (dpr < 1 ? 1 : dpr) * SIDEPANEL_OPENWIDTH;
|
||||||
|
var deltaX = (isOpened || close ? 0 : zoomAdjustedSidepanelWidth) - w;
|
||||||
changeSidePanelWidth(deltaX);
|
changeSidePanelWidth(deltaX);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34736,8 +34736,11 @@
|
||||||
|
|
||||||
|
|
||||||
var toggleSidePanel = function toggleSidePanel(close) {
|
var toggleSidePanel = function toggleSidePanel(close) {
|
||||||
|
var dpr = window.devicePixelRatio || 1;
|
||||||
var w = $$b('#sidepanels').width();
|
var w = $$b('#sidepanels').width();
|
||||||
var deltaX = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
|
var isOpened = (dpr < 1 ? w : w / dpr) > 2;
|
||||||
|
var zoomAdjustedSidepanelWidth = (dpr < 1 ? 1 : dpr) * SIDEPANEL_OPENWIDTH;
|
||||||
|
var deltaX = (isOpened || close ? 0 : zoomAdjustedSidepanelWidth) - w;
|
||||||
changeSidePanelWidth(deltaX);
|
changeSidePanelWidth(deltaX);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue