1.0
Use to push & pop panels in stack fashion. Makes it easy to manage & transition UIComponents (views, panels, etc) from anywhere in your app.
Include the PanelStack package which will include the necessary libs:
enyo.depends(
"path/to/PanelStack/package.js",
<your files go here>
);
Or you can just include PanelStack.js & include the necessary libs yourself (layout, fittable and panels):
<script src="path/to/PanelStack.js" type="text/javascript"></script>
Then instantiate the PanelStack kind:
{name: "panelStack", kind: "PanelStack", fit:true}
Now use this.$.panelStack to push and pop UIComponents like so:
this.$.panelStack.push(new View({}));
AND
this.$.panelStack.pop();
Note that the example uses Onyx, but it isn't required for use of PanelStack.
- .push( component ) -> Add a new component to the panel stack and transition it in as the active panel.
- .pop() -> Remove the active panel and transition to the previous panel. This will permanently remove the active panel.
- .setArranger( String ) -> Set the arranger type for transitions. This is persistent.
1.0 - Initial release