removed diff from object and arrays

This commit is contained in:
dzannotti 2015-08-07 23:54:38 +01:00
parent fb83a18614
commit deb9fa6225
2 changed files with 2 additions and 14 deletions

View File

@ -89,20 +89,14 @@ export default class JSONArrayNode extends React.Component {
listStyle: 'none', listStyle: 'none',
display: (this.state.expanded) ? 'block' : 'none' display: (this.state.expanded) ? 'block' : 'none'
}; };
let backgroundColor = 'transparent';
let containerStyle; let containerStyle;
let spanStyle = { let spanStyle = {
...styles.span, ...styles.span,
color: this.props.theme.base0E color: this.props.theme.base0E
}; };
if (typeof this.props.previousData !== 'undefined' && this.props.previousData === this.data) {
const bgColor = hexToRgb(this.props.theme.base08);
backgroundColor = `rgba(${bgColor.r}, ${bgColor.g}, ${bgColor.b}, 0.04)`;
}
containerStyle = { containerStyle = {
...styles.base, ...styles.base,
...styles.parentNode, ...styles.parentNode
backgroundColor
} }
if (this.state.expanded) { if (this.state.expanded) {

View File

@ -92,20 +92,14 @@ export default class JSONObjectNode extends React.Component {
listStyle: 'none', listStyle: 'none',
display: (this.state.expanded) ? 'block' : 'none' display: (this.state.expanded) ? 'block' : 'none'
}; };
let backgroundColor = 'transparent';
let containerStyle; let containerStyle;
let spanStyle = { let spanStyle = {
...styles.span, ...styles.span,
color: this.props.theme.base0B color: this.props.theme.base0B
}; };
if (typeof this.props.previousData !== 'undefined' && !shallowEqual(this.props.data, this.props.previousData || {})) {
const bgColor = hexToRgb(this.props.theme.base08);
backgroundColor = `rgba(${bgColor.r}, ${bgColor.g}, ${bgColor.b}, 0.04)`;
}
containerStyle = { containerStyle = {
...styles.base, ...styles.base,
...styles.parentNode, ...styles.parentNode
backgroundColor
}; };
if (this.state.expanded) { if (this.state.expanded) {
spanStyle = { spanStyle = {