From 41dded59938feb90162e459c833bf634bc8461b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bl=C3=A4sta?= Date: Tue, 30 Jan 2024 17:07:54 +0100 Subject: [PATCH] fix point error, removed rotate reset --- src/style/stylewindow.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/style/stylewindow.js b/src/style/stylewindow.js index 324b5e580..a13882175 100644 --- a/src/style/stylewindow.js +++ b/src/style/stylewindow.js @@ -299,8 +299,10 @@ const Stylewindow = function Stylewindow(optOptions = {}) { document.getElementById('o-draw-style-showMeasureSegments').checked = swStyle.showMeasureSegments; const bgFillEl = document.getElementById('o-draw-style-backgroundFillColor'); - swStyle.backgroundFillOpacity = rgbaToOpacity(swStyle.backgroundFill); - swStyle.backgroundFillColor = rgbaToRgb(swStyle.backgroundFill); + if (typeof swStyle.backgroundFill !== 'undefined') { + swStyle.backgroundFillOpacity = rgbaToOpacity(swStyle.backgroundFill); + swStyle.backgroundFillColor = rgbaToRgb(swStyle.backgroundFill); + } const bgFillInputEl = bgFillEl.querySelector(`input[value = "${swStyle.backgroundFillColor}"]`); if (bgFillInputEl) { bgFillInputEl.checked = true; @@ -487,7 +489,6 @@ const Stylewindow = function Stylewindow(optOptions = {}) { } if (newStyleObj.selected) { style.push(drawStyles.selectionStyle); - swStyle.objRotation = 0; } return style; }