Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var dimension = group.get('elements').reduce(function (sum, layer) {
return sum + layer.reduce(function (lSum, elProt) {
return lSum + elProt.size;
}, 0);
}, 0);
return _react2.default.createElement(
'tr',
{
key: groupID,
style: rowStyle
},
_react2.default.createElement(
'td',
{ style: iconColStyle, title: _this2.context.translator.t('Toggle Group Visibility') },
_react2.default.createElement(_fa.FaEye, {
onClick: swapVisibility,
style: !group.get('visible') ? styleEyeHidden : styleEyeVisible
})
),
_react2.default.createElement(
'td',
{ style: iconColStyle, title: _this2.context.translator.t('Chain selected Elements to Group') },
_react2.default.createElement(_fa.FaLink, {
onClick: chainToGroup,
style: !shouldHighlight ? styleEditButton : styleEditButtonHover
})
),
_react2.default.createElement(
'td',
{ style: iconColStyle, title: _this2.context.translator.t('Un-chain all Group\'s Elements and remove Group') },
_react2.default.createElement(_fa.FaUnlink, {
};
var isCurrentLayer = layerID === scene.selectedLayer;
return _react2.default.createElement(
'tr',
{
key: layerID,
onClick: selectClick,
onDoubleClick: configureClick,
style: !isCurrentLayer ? null : styleHoverColor
},
_react2.default.createElement(
'td',
{ style: iconColStyle },
!isCurrentLayer ? _react2.default.createElement(_fa.FaEye, {
onClick: swapVisibility,
style: !layer.visible ? styleEyeHidden : styleEyeVisible
}) : null
),
_react2.default.createElement(
'td',
{ style: iconColStyle },
_react2.default.createElement(_fa.FaPencilAlt, {
onClick: configureClick,
style: !isCurrentLayer ? styleEditButton : styleEditButtonHover,
title: _this2.context.translator.t('Configure layer')
})
),
_react2.default.createElement(
'td',
{ style: iconColStyle },