Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/components/models.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default class Models extends Component {
const ModelWrapper = getComponent("ModelWrapper")
const Collapse = getComponent("Collapse")
const ModelCollapse = getComponent("ModelCollapse")
const JumpToPath = getComponent("JumpToPath")

return <section className={ showModels ? "models is-open" : "models"}>
<h4 onClick={() => layoutActions.show("models", !showModels)}>
Expand All @@ -64,11 +65,13 @@ export default class Models extends Component {
this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(), name])
}

const specPath = Im.List([...specPathBase, name])

const content = <ModelWrapper name={ name }
expandDepth={ defaultModelsExpandDepth }
schema={ schema || Im.Map() }
displayName={displayName}
specPath={Im.List([...specPathBase, name])}
specPath={specPath}
getComponent={ getComponent }
specSelectors={ specSelectors }
getConfigs = {getConfigs}
Expand All @@ -82,6 +85,7 @@ export default class Models extends Component {
</span>

return <div id={ `model-${name}` } className="model-container" key={ `models-section-${name}` }>
<span className="models-jump-to-path"><JumpToPath specPath={specPath} /></span>
<ModelCollapse
classes="model-box"
collapsedContent={this.getCollapsedContent(name)}
Expand Down
8 changes: 8 additions & 0 deletions src/style/_models.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ section.models
.model-container
{
margin: 0 20px 15px;
position: relative;

transition: all .5s;

Expand All @@ -186,6 +187,13 @@ section.models
{
margin: 0 20px;
}

.models-jump-to-path {
position: absolute;
top: 8px;
right: 5px;
opacity: 0.65;
}
}

.model-box
Expand Down