- Fix: Adjust side panel width checking based on device zoom (fixes #298)

master
Brett Zamir 2018-10-30 22:33:29 +08:00
parent b0fad3d765
commit ba1f0d7f14
10 changed files with 28 additions and 9 deletions

View File

@ -1,5 +1,9 @@
# SVG-Edit CHANGES
# ?
- Fix: Adjust side panel width checking based on device zoom (fixes #298)
# 4.0.0
- Breaking change (storage preference cookies): Namespace the cookie as

5
dist/index-es.js vendored
View File

@ -34733,8 +34733,11 @@ editor.init = function () {
var toggleSidePanel = function toggleSidePanel(close) {
var dpr = window.devicePixelRatio || 1;
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);
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5
dist/index-umd.js vendored
View File

@ -34739,8 +34739,11 @@
var toggleSidePanel = function toggleSidePanel(close) {
var dpr = window.devicePixelRatio || 1;
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);
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5373,8 +5373,11 @@ editor.init = function () {
* @returns {undefined}
*/
const toggleSidePanel = function (close) {
const dpr = window.devicePixelRatio || 1;
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);
};

View File

@ -34736,8 +34736,11 @@
var toggleSidePanel = function toggleSidePanel(close) {
var dpr = window.devicePixelRatio || 1;
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);
};

View File

@ -34736,8 +34736,11 @@
var toggleSidePanel = function toggleSidePanel(close) {
var dpr = window.devicePixelRatio || 1;
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);
};