diff --git a/service2.js b/service2.js index 0cf2d42..e30390b 100644 --- a/service2.js +++ b/service2.js @@ -266,14 +266,20 @@ class BesService { */ setCorrectionPanelSize() { const styles = window.getComputedStyle(this.hostElement) + const totalWidth = + parseFloat(styles.paddingLeft) + + parseFloat(styles.marginLeft) + + parseFloat(styles.width) + + parseFloat(styles.marginRight) + + parseFloat(styles.paddingRight) const totalHeight = parseFloat(styles.paddingTop) + parseFloat(styles.marginTop) + parseFloat(styles.height) + parseFloat(styles.marginBottom) + parseFloat(styles.paddingBottom) + this.correctionPanel.style.width = `${totalWidth}px` this.correctionPanel.style.height = `${totalHeight}px` - this.correctionPanel.style.width = styles.width this.correctionPanel.style.marginLeft = styles.marginLeft this.correctionPanel.style.marginRight = styles.marginRight this.correctionPanel.style.paddingLeft = styles.paddingLeft