Picked up all the last-minute changes from the gh-pages branch (where I discovered a race condition between machines)

This commit is contained in:
Jeff Parsons 2016-08-19 13:03:30 -07:00
commit 23e78b971c
11 changed files with 965 additions and 946 deletions

View file

@ -226,17 +226,9 @@ Component.subclass = function(subclass, superclass, methods, statics)
* various resources used by that machine.
*/
if (window) {
if (!window['PCjs']) {
window['PCjs'] = {
'Machines': {},
'Components': []
};
}
/*
* Alias the new global objects above to their original property names, to minimize code changes.
*/
Component.machines = window['PCjs']['Machines'];
Component.components = window['PCjs']['Components'];
if (!window['PCjs']) window['PCjs'] = {};
Component.machines = window['PCjs']['Machines'] || (window['PCjs']['Machines'] = {});
Component.components = window['PCjs']['Components'] || (window['PCjs']['Components'] = []);
}
else {
/*