Given:
var FamousEngine = require('famous/core/FamousEngine');
var DOMElement = require('famous/dom-renderables/DOMElement');
var clock = FamousEngine.getClock();
FamousEngine.init();
var scene1 = FamousEngine.createScene('body');
scene1.dismount();
var scene2 = FamousEngine.createScene('body');
I get:
Uncaught Error: Node is not mounted
dismount @ bundle.js:2880
createScene @ bundle.js:1544
That's here:
FamousEngine.prototype.createScene = function createScene (selector) {
selector = selector || 'body';
if (this._scenes[selector]) this._scenes[selector].dismount(); // <---
this._scenes[selector] = new Scene(selector, this);
return this._scenes[selector];
};
So I guess the ref isn't cleaned up properly on dismount. Is this Scene.dismount()'s responsibility though? I don't recall if it's a new method or not, but calling FamousEngine.removeScene(scene1); works as expected.