svg group highlight
import React, { Component } from 'react'
-import gvUtils from './gvUtils'
+import {removeCustomProps, buildUniqueId} from './gvUtils'
class GvGroup extends Component {
render() {
- const cleanedUpProps = gvUtils.removeCustomProps(this.props)
- return <g {...cleanedUpProps}>
+ const {selected} = this.props
+ const cleanedUpProps = removeCustomProps(this.props)
+
+ const style = selected ? {filter: `url(#${buildUniqueId(this.props.diagramId, "highlight_filter")})` } : {}
+ return <g {...cleanedUpProps} style={style}>
{this.props.children}
</g>
}
