Skip to content

Commit

Permalink
rename setSize to resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Sedivy committed Apr 22, 2015
1 parent 34d0256 commit d60196c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app.js
Expand Up @@ -44,15 +44,15 @@ var App = function(container) {
this.debug = new Debugger(this);
};

App.prototype.setSize = function(width, height) {
App.prototype.resize = function(width, height) {
this.width = width;
this.height = height;

this.container.style.width = this.width + 'px';
this.container.style.height = this.height + 'px';

if (this.video) {
this.video._setSize(width, height);
this.video._resize(width, height);
}

if (this.states) {
Expand Down
2 changes: 1 addition & 1 deletion src/engine.js
Expand Up @@ -40,7 +40,7 @@ Engine.prototype.configureApp = function() {
this.controller.input = new Input(this.controller);
}

this.controller.setSize(this.controller.width, this.controller.height);
this.controller.resize(this.controller.width, this.controller.height);

this._setDefaultStates();

Expand Down
4 changes: 2 additions & 2 deletions src/video.js
Expand Up @@ -54,15 +54,15 @@ Video.prototype.scaleCanvas = function(scale) {
}
};

Video.prototype._setSize = function(width, height) {
Video.prototype._resize = function(width, height) {
this.width = width;
this.height = height;

this._applySizeToCanvas();

for (var i=0, len=this._children.length; i<len; i++) {
var item = this._children[i];
item._setSize(width, height);
item._resize(width, height);
}
};

Expand Down

0 comments on commit d60196c

Please sign in to comment.