|
|
@ -1,6 +1,7 @@
|
|
|
|
import React from 'react'
|
|
|
|
import React from 'react'
|
|
|
|
import enhanceWithClickOutside from 'react-click-outside'
|
|
|
|
import enhanceWithClickOutside from 'react-click-outside'
|
|
|
|
import { SketchPicker } from 'react-color'
|
|
|
|
import { SketchPicker } from 'react-color'
|
|
|
|
|
|
|
|
import shallowCompare from 'react-addons-shallow-compare'
|
|
|
|
import WindowPointer from './WindowPointer'
|
|
|
|
import WindowPointer from './WindowPointer'
|
|
|
|
import ImagePicker from './ImagePicker'
|
|
|
|
import ImagePicker from './ImagePicker'
|
|
|
|
import { COLORS, DEFAULT_BG_COLOR } from '../lib/constants'
|
|
|
|
import { COLORS, DEFAULT_BG_COLOR } from '../lib/constants'
|
|
|
@ -20,6 +21,13 @@ class BackgroundSelect extends React.PureComponent {
|
|
|
|
this.setState({ mounted: true })
|
|
|
|
this.setState({ mounted: true })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shouldComponentUpdate(prevProps, prevState) {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
prevState.isVisible !== this.state.isVisible ||
|
|
|
|
|
|
|
|
(prevState.isVisible && shallowCompare(this, prevProps, prevState))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
toggle() {
|
|
|
|
toggle() {
|
|
|
|
this.setState({ isVisible: !this.state.isVisible })
|
|
|
|
this.setState({ isVisible: !this.state.isVisible })
|
|
|
|
}
|
|
|
|
}
|
|
|
|