Skip to content

Commit 79cacf7

Browse files
committed
Rename onChildChange -> +d for consistency
1 parent a75bd90 commit 79cacf7

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

js/src/_base/Preview.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ var PreviewView = RenderableView.extend({
3434
setupEventListeners: function() {
3535
RenderableView.prototype.setupEventListeners.call(this);
3636
var child = this.model.get('child');
37-
this.listenTo(child, 'change', this.onChildChange.bind(this));
37+
this.listenTo(child, 'change', this.onChildChanged.bind(this));
3838
if (child.obj.isObject3D) {
3939
// Since we use clone for objects, we need to rebuild for
4040
// any nested change instead of just rerendering.
41-
this.listenTo(child, 'childchange', this.onChildChange.bind(this));
41+
this.listenTo(child, 'childchange', this.onChildChanged.bind(this));
4242
}
4343
},
4444

45-
onChildChange: function() {
45+
onChildChanged: function() {
4646
// Enabling this line will reset the camera
4747
// when any changes are made to the child
4848
//this._resetCameraNeeded = true;
@@ -257,11 +257,11 @@ var PreviewModel = RenderableModel.extend({
257257

258258
setupListeners: function() {
259259
var child = this.get('child');
260-
this.listenTo(child, 'change', this.onChildChange.bind(this));
261-
this.listenTo(child, 'childchange', this.onChildChange.bind(this));
260+
this.listenTo(child, 'change', this.onChildChanged.bind(this));
261+
this.listenTo(child, 'childchange', this.onChildChanged.bind(this));
262262
},
263263

264-
onChildChange: function(model, options) {
264+
onChildChanged: function(model, options) {
265265
this.trigger('rerender', this, {});
266266
},
267267

js/src/core/Renderer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ var RendererModel = RenderableModel.extend({
3838

3939
var scene = this.get('scene');
4040
var camera = this.get('camera');
41-
this.listenTo(scene, 'change', this.onChildChange.bind(this));
42-
this.listenTo(scene, 'childchange', this.onChildChange.bind(this));
43-
this.listenTo(scene, 'rerender', this.onChildChange.bind(this));
41+
this.listenTo(scene, 'change', this.onChildChanged.bind(this));
42+
this.listenTo(scene, 'childchange', this.onChildChanged.bind(this));
43+
this.listenTo(scene, 'rerender', this.onChildChanged.bind(this));
4444
this.listenTo(camera, 'change', this.onCameraChange.bind(this));
4545

4646
},
4747

4848
onCameraChange: function(model, options) {
49-
this.onChildChange();
49+
this.onChildChanged(model, options);
5050
},
5151

52-
onChildChange: function(model, options) {
52+
onChildChanged: function(model, options) {
5353
this.trigger('rerender', this, {});
5454
},
5555

0 commit comments

Comments
 (0)