assets/js/romo/select.js in romo-0.20.0 vs assets/js/romo/select.js in romo-0.20.1
- old
+ new
@@ -188,11 +188,11 @@
Romo.addClass(romoSelectDropdownElem, Romo.attr(this.elem, 'class'));
}
if (Romo.attr(this.elem, 'style') !== undefined) {
Romo.setAttr(romoSelectDropdownElem, 'style', Romo.attr(this.elem, 'style'));
}
- Romo.setStyle(romoSelectDropdownElem, 'width', Romo.css(this.elem, 'width'));
+ Romo.setStyle(romoSelectDropdownElem, 'width', Romo.width(this.elem)+'px');
if (Romo.attr(this.elem, 'disabled') !== undefined) {
Romo.setAttr(this.romoSelectDropdown.elem, 'disabled', Romo.attr(this.elem, 'disabled'));
}
Romo.after(this.elem, romoSelectDropdownElem);
@@ -208,11 +208,11 @@
this.caretElem = undefined;
var caretClass = Romo.data(this.elem, 'romo-select-caret') || this.defaultCaretClass;
if (caretClass !== undefined && caretClass !== 'none') {
this.caretElem = Romo.elems('<i class="romo-select-caret '+caretClass+'"></i>')[0];
- Romo.setStyle(this.caretElem, 'line-height', parseInt(Romo.css(romoSelectDropdownElem, "line-height"), 10)+'px');
+ Romo.setStyle(this.caretElem, 'line-height', Romo.css(romoSelectDropdownElem, 'line-height'));
Romo.on(this.caretElem, 'click', Romo.proxy(this._onCaretClick, this));
Romo.append(romoSelectDropdownElem, this.caretElem);
var caretPaddingPx = this._getCaretPaddingPx();
var caretWidthPx = this._getCaretWidthPx();
@@ -310,10 +310,10 @@
this.defaultCaretPosition
);
}
RomoSelect.prototype._parseCaretWidthPx = function() {
- var widthPx = parseInt(Romo.css(this.caretElem, "width"), 10);
+ var widthPx = Romo.width(this.caretElem);
if (isNaN(widthPx)) {
widthPx = this.defaultCaretWidthPx;
}
return widthPx;
}