diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-17 20:08:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-17 20:08:48 -0400 |
| commit | 28e1be405612031aedd43351adb78699f2f36faf (patch) | |
| tree | a573c994c831f23978e32476724012a60b4020bc /src/client/views/collections/CollectionMenu.tsx | |
| parent | 39e49bbb6943a546123765f8969ea4f054157ae5 (diff) | |
| parent | 681460e3ef16cd6031447108d62a4d160eb3266f (diff) | |
Merge pull request #632 from browngraphicslab/bug_fixes_melissa
Bug fixes melissa
Diffstat (limited to 'src/client/views/collections/CollectionMenu.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionMenu.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index eea8a3158..25a2fee04 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -982,7 +982,7 @@ export class CollectionGridViewChrome extends React.Component<CollectionMenuProp */ onDecrementButtonClick = () => { this.clicked = true; - if (!this.decrementLimitReached) { + if (this.numCols > 1 && !this.decrementLimitReached) { this.entered && (this.document.gridNumCols as number)++; undoBatch(() => this.document.gridNumCols = this.numCols - 1)(); } @@ -1007,7 +1007,7 @@ export class CollectionGridViewChrome extends React.Component<CollectionMenuProp decrementValue = () => { this.entered = true; if (!this.clicked) { - if (this.numCols !== 1) { + if (this.numCols > 1) { this.document.gridNumCols = this.numCols - 1; } else { @@ -1041,8 +1041,8 @@ export class CollectionGridViewChrome extends React.Component<CollectionMenuProp <FontAwesomeIcon icon="columns" size="1x" /> </span> <input className="collectionGridViewChrome-entryBox" type="number" placeholder={this.numCols.toString()} onKeyDown={this.onNumColsEnter} onClick={(e: React.MouseEvent<HTMLInputElement, MouseEvent>) => { e.stopPropagation(); e.preventDefault(); e.currentTarget.focus(); }} /> - <input className="columnButton" onClick={this.onIncrementButtonClick} onMouseEnter={this.incrementValue} onMouseLeave={this.decrementValue} type="button" value="↑" /> - <input className="columnButton" style={{ marginRight: 5 }} onClick={this.onDecrementButtonClick} onMouseEnter={this.decrementValue} onMouseLeave={this.incrementValue} type="button" value="↓" /> + <input className="collectionGridViewChrome-columnButton" onClick={this.onIncrementButtonClick} onMouseEnter={this.incrementValue} onMouseLeave={this.decrementValue} type="button" value="↑" /> + <input className="collectionGridViewChrome-columnButton" style={{ marginRight: 5 }} onClick={this.onDecrementButtonClick} onMouseEnter={this.decrementValue} onMouseLeave={this.incrementValue} type="button" value="↓" /> </span> {/* <span className="grid-control"> <span className="grid-icon"> |
