Skip to content

Commit 4196f3f

Browse files
committed
fix: testing margins
1 parent 44df09f commit 4196f3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/GEOComp.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,12 @@ var GEOComp = (function () {
280280
if (featureEnabled('scaleToBottom') && props.autoHeight) {
281281
const pads = props.styles.padding.split(' ');
282282
const marg = props.styles.margin.split(' ');
283-
const offset = (parseFloat(pads[pads.length == 4 ? 3 : 0].replace("px", "")) * 2) + (parseFloat(marg[marg.length == 4 ? 3 : 0].replace("px", "")) * 2)
283+
const offset = 0
284+
//const offset = (parseFloat(pads[pads.length == 4 ? 3 : 0].replace("px", "")) * 2) + (parseFloat(marg[marg.length == 4 ? 3 : 0].replace("px", "")) * 2)
284285
//TODO: Take care of margin and padding, but also that of parents
285286
var newHeight = dimensions.height + (eventObj.windowSize.height - eventObj.bounds.bottom - (offset + (props.resizeOffset || 0)))
286287
if (newHeight != dimensions.height) {
287-
eventObj.element.style.height = `${newHeight + offset}px`
288+
eventObj.element.style.height = `${newHeight}px`
288289
setDimensions({ width: dimensions.width, height: newHeight })
289290
if (featureEnabled("debug"))
290291
console.debug("Resized done", newHeight)

0 commit comments

Comments
 (0)