allow toolbar zoom when infinite wb enabled
This commit is contained in:
parent
f024995f98
commit
57137aceca
@ -147,7 +147,6 @@ class ZoomTool extends PureComponent {
|
||||
intl,
|
||||
isMeteorConnected,
|
||||
step,
|
||||
isInfiniteCanvas,
|
||||
} = this.props;
|
||||
const { stateZoomValue } = this.state;
|
||||
|
||||
@ -171,7 +170,6 @@ class ZoomTool extends PureComponent {
|
||||
exec={this.decrement}
|
||||
value={zoomValue}
|
||||
minBound={minBound}
|
||||
isInfiniteCanvas={isInfiniteCanvas}
|
||||
>
|
||||
<Styled.DecreaseZoomButton
|
||||
color="light"
|
||||
@ -184,7 +182,7 @@ class ZoomTool extends PureComponent {
|
||||
data-test="zoomOutBtn"
|
||||
icon="substract"
|
||||
onClick={() => { }}
|
||||
disabled={(zoomValue <= minBound) || !isMeteorConnected || isInfiniteCanvas}
|
||||
disabled={(zoomValue <= minBound) || !isMeteorConnected}
|
||||
hideLabel
|
||||
/>
|
||||
<div id="zoomOutDescription" hidden>{intl.formatMessage(intlMessages.zoomOutDesc)}</div>
|
||||
@ -215,7 +213,6 @@ class ZoomTool extends PureComponent {
|
||||
exec={this.increment}
|
||||
value={zoomValue}
|
||||
maxBound={maxBound}
|
||||
isInfiniteCanvas={isInfiniteCanvas}
|
||||
>
|
||||
<Styled.IncreaseZoomButton
|
||||
color="light"
|
||||
@ -228,7 +225,7 @@ class ZoomTool extends PureComponent {
|
||||
data-test="zoomInBtn"
|
||||
icon="add"
|
||||
onClick={() => { }}
|
||||
disabled={(zoomValue >= maxBound) || !isMeteorConnected || isInfiniteCanvas}
|
||||
disabled={(zoomValue >= maxBound) || !isMeteorConnected}
|
||||
hideLabel
|
||||
/>
|
||||
<div id="zoomInDescription" hidden>{intl.formatMessage(intlMessages.zoomInDesc)}</div>
|
||||
|
@ -26,10 +26,9 @@ class HoldDownButton extends PureComponent {
|
||||
minBound,
|
||||
maxBound,
|
||||
value,
|
||||
isInfiniteCanvas
|
||||
} = this.props;
|
||||
const bounds = (value === maxBound) || (value === minBound);
|
||||
if (bounds || isInfiniteCanvas) return;
|
||||
if (bounds) return;
|
||||
exec();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user