Skip to content

Commit

Permalink
use new notifyCurrentValue() varargs api, refs ibm-js/decor#14
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed Dec 31, 2014
1 parent 9e44252 commit 0715878
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions ProgressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ define([
},

postRender: function () {
this.notifyCurrentValue("value");
this.notifyCurrentValue("max");
this.notifyCurrentValue("value", "max");
},

/**
Expand Down
3 changes: 1 addition & 2 deletions SidePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ define([
setVisibility(this, false);

// trigger refreshRendering() to run and apply mode & position even if they are the default values
this.notifyCurrentValue("mode");
this.notifyCurrentValue("position");
this.notifyCurrentValue("mode", "position");
},

preRender: function () {
Expand Down
9 changes: 3 additions & 6 deletions Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,8 @@ define([
this.on("focus", this.focusHandler.bind(this));
this.on("focus", this.focusHandler.bind(this));

// ensure CSS is applied
this.notifyCurrentValue("vertical");

// apply default tabIndex in case the app doesn't specific tabindex explicitly
this.notifyCurrentValue("tabIndex");
// ensure CSS is applied, and apply default tabIndex in case the app doesn't specify tabindex explicitly
this.notifyCurrentValue("vertical", "tabIndex");

if (this.valueNode.value) { // INPUT value
// browser back button or value coded on INPUT
Expand All @@ -351,7 +348,7 @@ define([
}

// force calculation of the default value in case it is not specified.
["min", "max", "step", "value"].forEach(this.notifyCurrentValue, this);
this.notifyCurrentValue("min", "max", "step", "value");
},

attachedCallback: function () {
Expand Down
4 changes: 1 addition & 3 deletions StarRating.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ define([
this.valueNode.style.display = "none";
this.appendChild(this.valueNode);
}
["disabled", "max", "value", "name", "readOnly", "allowZero"].forEach(function (prop) {
this.notifyCurrentValue(prop);
}, this);
this.notifyCurrentValue("disabled", "max", "value", "name", "readOnly", "allowZero");
}),

/* jshint maxcomplexity: 13 */
Expand Down

0 comments on commit 0715878

Please sign in to comment.