Skip to content

Commit

Permalink
refactor(layout-service): more descriptive method name
Browse files Browse the repository at this point in the history
  • Loading branch information
koriroys committed Mar 24, 2016
1 parent 2c5a804 commit a1a7086
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/services/device/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default Service.extend({
window.removeEventListener('resize', this._resizeHandler, true);
},

getResolution() {
updateResolution() {
let w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
let h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);

Expand All @@ -43,7 +43,7 @@ export default Service.extend({

setupResize() {
this._resizeHandler = () => {
run.debounce(this, this.getResolution, 16);
run.debounce(this, this.updateResolution, 16);
};
window.addEventListener('resize', this._resizeHandler, true);
},
Expand Down Expand Up @@ -89,7 +89,7 @@ export default Service.extend({

this.setupBreakpoints();
this.setupResize();
this.getResolution();
this.updateResolution();
}

});

0 comments on commit a1a7086

Please sign in to comment.