deathcap / inventory-window

GUI windows for interactively manipulating an inventory
http://deathcap.github.io/inventory-window/
7 stars 2 forks source link

Excess gap on bottom of container in Firefox (sometimes) #14

Closed deathcap closed 10 years ago

deathcap commented 10 years ago

https://github.com/deathcap/voxel-inventory-hotbar/ (a 1x10 inventory-window) in Firefox: screen shot 2014-01-11 at 11 46 33 pm

Chrome: screen shot 2014-01-11 at 11 46 46 pm

deathcap commented 10 years ago

Firefox console > inspector > right-click > Copy Outer HTML, saving to a separate file does not reproduce this problem. inventory-window doesn't specify a height for the outer container. Interestingly, trying to programmatically calculate the height:

@width = opts.width ? @inventory.width      # number of columns
@height = opts.height ? @inventory.height   # number of rows

heightpx = @height * (@textureSize + @borderSize)

height: #{heightpx}px;

displays it much higher than expected: screen shot 2014-01-12 at 12 02 23 am

hardcoding the expected 88px works, but that's identical to the height * (textureSize + 2 * borderSize) calculation. There are multiple inventory containers - testing on https://github.com/deathcap/voxpopuli/tree/48225cccbd55d311a9a42c87279914ae4e18777c - appears they somehow influence each other through the DOM (but only on Firefox). The inspector shows the CSS height is set to 'auto'.

deathcap commented 10 years ago

possibly related https://github.com/deathcap/inventory-window/issues/7 Excess border gap when using browser resize scaling ≠ 100% but on FF, this gap occurs at 100% scaling (though not in the inventory-window demo http://deathcap.github.io/inventory-window/ , only the voxel-inventory-hotbar)

deathcap commented 10 years ago

Likely fixed by https://github.com/deathcap/inventory-window/commit/a1fe17fb5a9bbc1e334b286ea10edd84ace3d689

deathcap commented 10 years ago

Fixed by https://github.com/deathcap/inventory-window/commit/a1fe17fb5a9bbc1e334b286ea10edd84ace3d689