Remove primary toolbar splitter (#1811)

This commit is contained in:
yanas
2017-07-21 14:21:39 -07:00
committed by virtuacoplenny
parent 06234066b6
commit b0ffe2e63f
4 changed files with 4 additions and 48 deletions
@@ -30,28 +30,6 @@ class PrimaryToolbar extends Component {
state: Object;
/**
* Constructs instance of primary toolbar React component.
*
* @param {Object} props - React component's properties.
*/
constructor(props) {
super(props);
const splitterIndex = interfaceConfig.MAIN_TOOLBAR_SPLITTER_INDEX;
this.state = {
/**
* If deployment supports toolbar splitter this value contains its
* index.
*
* @type {number}
*/
splitterIndex
};
}
/**
* Renders primary toolbar component.
*
@@ -67,7 +45,6 @@ class PrimaryToolbar extends Component {
return null;
}
const { splitterIndex } = this.state;
const { primaryToolbarClassName } = getToolbarClassNames(this.props);
const tooltipPosition
= interfaceConfig.filmStripOnly ? 'left' : 'bottom';
@@ -75,7 +52,6 @@ class PrimaryToolbar extends Component {
return (
<Toolbar
className = { primaryToolbarClassName }
splitterIndex = { splitterIndex }
toolbarButtons = { _primaryToolbarButtons }
tooltipPosition = { tooltipPosition } />
);
@@ -44,12 +44,6 @@ class Toolbar extends Component {
*/
className: React.PropTypes.string,
/**
* If the toolbar requires splitter this property defines splitter
* index.
*/
splitterIndex: React.PropTypes.number,
/**
* Map with toolbar buttons.
*/
@@ -105,12 +99,11 @@ class Toolbar extends Component {
* @param {Array} acc - Toolbar buttons array.
* @param {Array} keyValuePair - Key value pair containing button and its
* key.
* @param {number} index - Index of the key value pair in the array.
* @private
* @returns {Array} Array of toolbar buttons and splitter if it's on.
* @returns {Array} Array of toolbar buttons.
*/
_renderToolbarButton(acc: Array<*>, keyValuePair: Array<*>,
index: number): Array<ReactElement<*>> {
_renderToolbarButton(acc: Array<*>,
keyValuePair: Array<*>): Array<ReactElement<*>> {
const [ key, button ] = keyValuePair;
if (button.component) {
@@ -123,13 +116,7 @@ class Toolbar extends Component {
return acc;
}
const { splitterIndex, tooltipPosition } = this.props;
if (splitterIndex && index === splitterIndex) {
const splitter = <span className = 'toolbar__splitter' />;
acc.push(splitter);
}
const { tooltipPosition } = this.props;
const { onClick, onMount, onUnmount } = button;