Skip to content

Commit d35c27b

Browse files
fix: Scene#NO_DEFAULT_COMPONENTS to allow dismounting Scene
1 parent 6fe8c1a commit d35c27b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

core/FamousEngine.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,11 @@ FamousEngine.prototype.createScene = function createScene (selector) {
386386
* @return {FamousEngine} this
387387
*/
388388
FamousEngine.prototype.addScene = function addScene (scene) {
389-
var selector = scene._selector;
389+
var selector = scene._id;
390390

391391
var current = this._scenes[selector];
392392
if (current && current !== scene) current.dismount();
393-
if (!scene.isMounted()) scene.mount(scene._selector);
393+
if (!scene.isMounted()) scene.mount(scene._id);
394394
this._scenes[selector] = scene;
395395
return this;
396396
};

core/Scene.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
* THE SOFTWARE.
2323
*/
2424

25-
/*jshint -W079 */
26-
2725
'use strict';
2826

2927
var Node = require('./Node');
@@ -44,10 +42,8 @@ function Scene () {
4442
Node.call(this);
4543
}
4644

47-
// Scene inherits from node
4845
Scene.prototype = Object.create(Node.prototype);
4946
Scene.prototype.constructor = Scene;
50-
Scene.NO_DEFAULT_COMPONENTS = true;
5147

5248
/**
5349
* Returns the selector that the context was instantiated with

0 commit comments

Comments
 (0)