Improve look&feel
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
@keyframes example {
|
@keyframes example {
|
||||||
0% {background-color: none;}
|
0% {background-color: none;}
|
||||||
25% {background-color: #3f51b5;}
|
25% {background-color: #3f51b5 ;}
|
||||||
50% {background-color: #3f51b5;}
|
50% {background-color: #3f51b5;}
|
||||||
100% {background-color: none;}
|
100% {background-color: none;}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,9 @@ const styles = (theme: Theme) => ({
|
|||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
},
|
},
|
||||||
root: {
|
root: {
|
||||||
margin: '13vw 10vw 0 10vw',
|
margin: '13vw auto 0 auto',
|
||||||
minWidth: '550px',
|
minWidth: '800px',
|
||||||
|
maxWidth: '850px',
|
||||||
height: '440px',
|
height: '440px',
|
||||||
outline: 'none' as 'none',
|
outline: 'none' as 'none',
|
||||||
display: 'flex' as 'flex',
|
display: 'flex' as 'flex',
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ const styles = (theme: Theme) => {
|
|||||||
marginTop: '-1px',
|
marginTop: '-1px',
|
||||||
},
|
},
|
||||||
selected: {
|
selected: {
|
||||||
backgroundColor: 'rgba(120, 120, 120, 0.55)',
|
backgroundColor: 'rgba(200, 200, 200, 0.55)',
|
||||||
},
|
},
|
||||||
hover: {
|
hover: {
|
||||||
backgroundColor: 'rgba(80, 80, 80, 0.55)',
|
backgroundColor: 'rgba(100, 100, 100, 0.55)',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -187,23 +187,24 @@ class TreeNode extends React.Component<Props, State> {
|
|||||||
this.animationDirty = shouldStartAnimation
|
this.animationDirty = shouldStartAnimation
|
||||||
|
|
||||||
const highlightClass = this.state.selected ? this.props.classes.selected : (this.state.mouseOver ? this.props.classes.hover : '')
|
const highlightClass = this.state.selected ? this.props.classes.selected : (this.state.mouseOver ? this.props.classes.hover : '')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={this.props.treeNode.hash()}
|
key={this.props.treeNode.hash()}
|
||||||
className={`${classes.node} ${this.props.className} ${highlightClass}`}
|
className={`${classes.node} ${this.props.className}`}
|
||||||
onClick={this.didClickNode}
|
onClick={this.didClickNode}
|
||||||
onMouseOver={this.mouseOver}
|
onMouseOver={this.mouseOver}
|
||||||
onMouseOut={this.mouseOut}
|
onMouseOut={this.mouseOut}
|
||||||
ref={this.nodeRef}
|
ref={this.nodeRef}
|
||||||
>
|
>
|
||||||
<span ref={this.titleRef} style={animation}>
|
|
||||||
<TreeNodeTitle
|
<TreeNodeTitle
|
||||||
|
style={animation}
|
||||||
collapsed={this.collapsed()}
|
collapsed={this.collapsed()}
|
||||||
treeNode={this.props.treeNode}
|
treeNode={this.props.treeNode}
|
||||||
name={this.props.name}
|
name={this.props.name}
|
||||||
didSelectNode={this.didSelectTopic}
|
didSelectNode={this.didSelectTopic}
|
||||||
|
className={highlightClass}
|
||||||
/>
|
/>
|
||||||
</span>
|
|
||||||
{this.renderNodes()}
|
{this.renderNodes()}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ const styles = (theme: Theme) => ({
|
|||||||
clear: 'both' as 'both',
|
clear: 'both' as 'both',
|
||||||
},
|
},
|
||||||
listItem: {
|
listItem: {
|
||||||
padding: '3px 0px 0px 8px',
|
padding: '0px 0px 0px 8px',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,11 @@ class TreeNodeTitle extends React.Component<TreeNodeProps, {}> {
|
|||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
return (
|
return (
|
||||||
<span className={this.props.classes.title} onMouseOver={this.props.treeNode.message ? this.mouseOver : undefined}>
|
<span
|
||||||
|
className={`${this.props.classes.title} ${this.props.className}`}
|
||||||
|
onMouseOver={this.props.treeNode.message ? this.mouseOver : undefined}
|
||||||
|
style={this.props.style}
|
||||||
|
>
|
||||||
{this.renderExpander()} {this.renderSourceEdge()} {this.renderCollapsedSubnodes()} {this.renderValue()}
|
{this.renderExpander()} {this.renderSourceEdge()} {this.renderCollapsedSubnodes()} {this.renderValue()}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
@@ -69,17 +73,21 @@ const styles = (theme: Theme) => ({
|
|||||||
overflow: 'hidden' as 'hidden',
|
overflow: 'hidden' as 'hidden',
|
||||||
textOverflow: 'ellipsis' as 'ellipsis',
|
textOverflow: 'ellipsis' as 'ellipsis',
|
||||||
padding: '0',
|
padding: '0',
|
||||||
marginLeft: '5px',
|
// display: 'inline-block' as 'inline-block',
|
||||||
display: 'inline-block' as 'inline-block',
|
|
||||||
},
|
},
|
||||||
sourceEdge: {
|
sourceEdge: {
|
||||||
fontWeight: 'bold' as 'bold',
|
fontWeight: 'bold' as 'bold',
|
||||||
overflow: 'hidden' as 'hidden',
|
overflow: 'hidden' as 'hidden',
|
||||||
display: 'inline-block' as 'inline-block',
|
// display: 'inline-block' as 'inline-block',
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
|
borderRadius: '4px',
|
||||||
lineHeight: '1em',
|
lineHeight: '1em',
|
||||||
|
display: 'inline-block' as 'inline-block',
|
||||||
whiteSpace: 'nowrap' as 'nowrap',
|
whiteSpace: 'nowrap' as 'nowrap',
|
||||||
|
padding: '2px 4px 0px 4px',
|
||||||
|
height: '16px',
|
||||||
|
margin: '1px 0px 2px 0px',
|
||||||
},
|
},
|
||||||
collapsedSubnodes: {
|
collapsedSubnodes: {
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
|
|||||||
Reference in New Issue
Block a user