Compare commits

...
2 Commits
Author SHA1 Message Date
kyle 8ad9cb472b Merge branch 'master' into editor-1791 2018-06-22 21:17:38 -07:00
Kyle Shockey e3c0efeb12 improvement: re-enable and improve Models jump-to-path 2018-06-22 21:08:14 -07:00
2 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -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)}>
@@ -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}
@@ -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)}
+8
View File
@@ -166,6 +166,7 @@ section.models
.model-container
{
margin: 0 20px 15px;
position: relative;
transition: all .5s;
@@ -186,6 +187,13 @@ section.models
{
margin: 0 20px;
}
.models-jump-to-path {
position: absolute;
top: 8px;
right: 5px;
opacity: 0.65;
}
}
.model-box