Skip to content

Commit

Permalink
Hotfix: Pass spinner elem when adding/removing styles
Browse files Browse the repository at this point in the history
This fixes an issue in the spinner js component. The component
was calling `setStyle` and `rmStyle` without passing its elem to
them.
  • Loading branch information
jcredding committed Oct 23, 2017
1 parent 0fe8b9b commit ddc89fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions assets/js/romo/spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ RomoSpinner.prototype.doStart = function(customBasisSize) {
this.elemHtml = this.elem.innerHTML;
this.elemStyle = Romo.attr(this.elem, 'style');

Romo.setStyle('position', 'relative');
Romo.setStyle('width', Romo.css(this.elem, 'width'));
Romo.setStyle('height', Romo.css(this.elem, 'height'));
Romo.setStyle(this.elem, 'position', 'relative');
Romo.setStyle(this.elem, 'width', Romo.css(this.elem, 'width'));
Romo.setStyle(this.elem, 'height', Romo.css(this.elem, 'height'));

Romo.updateHtml(this.elem, '');
this.spinner.spin(this.elem);
Expand All @@ -62,9 +62,9 @@ RomoSpinner.prototype.doStop = function() {
if (this.elemHtml !== undefined) {
Romo.updateHtml(this.elem, this.elemHtml);
}
Romo.rmStyle('position');
Romo.rmStyle('width');
Romo.rmStyle('height');
Romo.rmStyle(this.elem, 'position');
Romo.rmStyle(this.elem, 'width');
Romo.rmStyle(this.elem, 'height');

if (this.elemStyle !== undefined) {
Romo.setAttr(this.elem, 'style', this.elemStyle);
Expand Down

0 comments on commit ddc89fa

Please sign in to comment.