Commit b281a80 1 parent c98d91e commit b281a80 Copy full SHA for b281a80
File tree 1 file changed +10
-4
lines changed
web/app/components/workflow/operator
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ const ZoomInOut: FC = () => {
129
129
crossAxis : - 2 ,
130
130
} }
131
131
>
132
- < PortalToFollowElemTrigger asChild onClick = { handleTrigger } >
132
+ < PortalToFollowElemTrigger asChild >
133
133
< div className = { `
134
134
p-0.5 h-9 cursor-pointer text-[13px] backdrop-blur-[5px] rounded-lg
135
135
bg-components-actionbar-bg shadow-lg border-[0.5px] border-components-actionbar-border
@@ -144,23 +144,29 @@ const ZoomInOut: FC = () => {
144
144
shortcuts = { [ 'ctrl' , '-' ] }
145
145
>
146
146
< div
147
- className = ' flex items-center justify-center w-8 h-8 rounded-lg cursor-pointer'
147
+ className = { ` flex items-center justify-center w-8 h-8 rounded-lg ${ zoom <= 0.25 ? ' cursor-not-allowed' : 'cursor- pointer hover:bg-black/5' } ` }
148
148
onClick = { ( e ) => {
149
+ if ( zoom <= 0.25 )
150
+ return
151
+
149
152
e . stopPropagation ( )
150
153
zoomOut ( )
151
154
} }
152
155
>
153
156
< RiZoomOutLine className = 'w-4 h-4 text-text-tertiary hover:text-text-secondary' />
154
157
</ div >
155
158
</ TipPopup >
156
- < div className = { cn ( 'w-[34px] system-sm-medium text-text-tertiary hover:text-text-secondary' ) } > { parseFloat ( `${ zoom * 100 } ` ) . toFixed ( 0 ) } %</ div >
159
+ < div onClick = { handleTrigger } className = { cn ( 'w-[34px] system-sm-medium text-text-tertiary hover:text-text-secondary' ) } > { parseFloat ( `${ zoom * 100 } ` ) . toFixed ( 0 ) } %</ div >
157
160
< TipPopup
158
161
title = { t ( 'workflow.operator.zoomIn' ) }
159
162
shortcuts = { [ 'ctrl' , '+' ] }
160
163
>
161
164
< div
162
- className = ' flex items-center justify-center w-8 h-8 rounded-lg cursor-pointer'
165
+ className = { ` flex items-center justify-center w-8 h-8 rounded-lg ${ zoom >= 2 ? ' cursor-not-allowed' : 'cursor- pointer hover:bg-black/5' } ` }
163
166
onClick = { ( e ) => {
167
+ if ( zoom >= 2 )
168
+ return
169
+
164
170
e . stopPropagation ( )
165
171
zoomIn ( )
166
172
} }
You can’t perform that action at this time.
0 commit comments