allow toolbar zoom when infinite wb enabled

This commit is contained in:
KDSBrowne 2024-07-03 21:16:13 +00:00
parent f024995f98
commit 57137aceca
2 changed files with 3 additions and 7 deletions

View File

@ -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>

View File

@ -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();
}