File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
invokeai/frontend/web/src/common/components Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,13 @@ const IAIDndImage = (props: IAIDndImageProps) => {
155155 return styles ;
156156 } , [ isUploadDisabled , minSize ] ) ;
157157
158+ const openInNewTab = useCallback ( ( ) => {
159+ if ( ! imageDTO ) {
160+ return ;
161+ }
162+ window . open ( imageDTO . image_url , '_blank' ) ;
163+ } , [ imageDTO ] ) ;
164+
158165 return (
159166 < ImageContextMenu imageDTO = { imageDTO } >
160167 { ( ref ) => (
@@ -212,7 +219,12 @@ const IAIDndImage = (props: IAIDndImageProps) => {
212219 ) }
213220 { ! imageDTO && isUploadDisabled && noContentFallback }
214221 { imageDTO && ! isDragDisabled && (
215- < IAIDraggable data = { draggableData } disabled = { isDragDisabled || ! imageDTO } onClick = { onClick } />
222+ < IAIDraggable
223+ data = { draggableData }
224+ disabled = { isDragDisabled || ! imageDTO }
225+ onClick = { onClick }
226+ onAuxClick = { openInNewTab }
227+ />
216228 ) }
217229 { children }
218230 { ! isDropDisabled && < IAIDroppable data = { droppableData } disabled = { isDropDisabled } dropLabel = { dropLabel } /> }
You can’t perform that action at this time.
0 commit comments