Skip to content

Commit

Permalink
First refactor of Tab to TSX. See #43
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Aug 10, 2016
1 parent a61ee37 commit 5f37d78
Show file tree
Hide file tree
Showing 5 changed files with 406 additions and 313 deletions.
13 changes: 11 additions & 2 deletions lib/gui/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,16 @@ module Animate {
<div id="toolbar">
<Toolbar />
</div>
<div id="stage"></div>
<div id="stage">
<Tab>
<TabPane label="One">
<h2>One!</h2>
</TabPane>
<TabPane label="Two">
<h2>Two!</h2>
</TabPane>
</Tab>
</div>
</div>
}

Expand Down Expand Up @@ -180,7 +189,7 @@ module Animate {
PropertyGrid.getSingleton().projectReset();
Logger.getSingleton().clearItems();
TreeViewScene.getSingleton().projectReset(user.project);
CanvasTab.getSingleton().projectReset();
//CanvasTab.getSingleton().projectReset();


//Must be called after reset
Expand Down
29 changes: 29 additions & 0 deletions lib/gui/tab/tab-pane.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module Animate {

export interface ITabPaneProps {
label: string;
}

/**
* A single page/pane/folder pair for use in a Tab
*/
export class TabPane extends React.Component<ITabPaneProps, any > {

/**
* Creates a new pane instance
*/
constructor(props:ITabPaneProps) {
super(props);
}

/**
* Creates the component elements
* @returns {JSX.Element}
*/
render(): JSX.Element {
return <div className="tab-page background">
{this.props.children}
</div>
}
}
}
310 changes: 0 additions & 310 deletions lib/gui/tab/tab.ts

This file was deleted.

Loading

0 comments on commit 5f37d78

Please sign in to comment.