assets/js/romo/base.js in romo-0.20.1 vs assets/js/romo/base.js in romo-0.20.2
- old
+ new
@@ -241,14 +241,22 @@
elem.style.display = 'none';
});
}
Romo.prototype.height = function(elem) {
- return elem.getBoundingClientRect().height;
+ var height = elem.getBoundingClientRect().height;
+ if (height === 0) {
+ height = parseInt(Romo.css(elem, 'height'), 10);
+ }
+ return height;
}
Romo.prototype.width = function(elem) {
- return elem.getBoundingClientRect().width;
+ var width = elem.getBoundingClientRect().width;
+ if (width === 0) {
+ width = parseInt(Romo.css(elem, 'width'), 10);
+ }
+ return width;
}
Romo.prototype.offset = function(elem) {
var elemRect = elem.getBoundingClientRect();
var bodyRect = document.body.getBoundingClientRect();