Closed deathcap closed 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:
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'.
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)
https://github.com/deathcap/voxel-inventory-hotbar/ (a 1x10 inventory-window) in Firefox:
Chrome: