mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 10:07:35 +00:00
Allow group to be initialized with all nulls
This commit is contained in:
parent
8ed22cf414
commit
498fddf87a
3 changed files with 9 additions and 4 deletions
|
|
@ -74,7 +74,7 @@ export function gotSkinZip(zip: JSZip, store: ModernStore): Thunk {
|
|||
|
||||
dispatch(setXmlTree(xmlTree));
|
||||
|
||||
const makiTree = await initialize(zip, xmlTree);
|
||||
const makiTree: MakiObject = await initialize(zip, xmlTree);
|
||||
// Execute scripts
|
||||
await Utils.asyncTreeFlatMap(makiTree, async (node: MakiObject) => {
|
||||
if (!(node instanceof JsScript)) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,11 @@ class GuiObject extends MakiObject {
|
|||
_transitionParams: TransitionParams;
|
||||
_targetAnimationStartTime: number;
|
||||
_targetAnimationCancelID: number | null;
|
||||
constructor(node: XmlNode, parent: MakiObject, annotations: Object = {}) {
|
||||
constructor(
|
||||
node: XmlNode | null,
|
||||
parent: MakiObject | null,
|
||||
annotations: Object = {}
|
||||
) {
|
||||
super(node, parent, annotations);
|
||||
|
||||
this._setAttributeDefaults();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import Layout from "./Layout";
|
|||
import GuiObject from "./GuiObject";
|
||||
|
||||
class System extends MakiObject {
|
||||
_scriptGroup: Group;
|
||||
_scriptGroup: MakiObject;
|
||||
_root: MakiObject;
|
||||
_store: ModernStore;
|
||||
_privateInt: Map<string, Map<string, number>>;
|
||||
|
|
@ -21,7 +21,8 @@ class System extends MakiObject {
|
|||
super(null, null);
|
||||
this._store = store;
|
||||
|
||||
this._scriptGroup = scriptGroup == null ? new Group() : scriptGroup;
|
||||
this._scriptGroup =
|
||||
scriptGroup == null ? new Group(null, null) : scriptGroup;
|
||||
this._root = this._scriptGroup;
|
||||
while (this._root.parent) {
|
||||
this._root = this._root.parent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue