chore: show action on hover even if there is no film (#26655)

This commit is contained in:
Pavel Feldman 2023-08-23 12:55:01 -07:00 committed by GitHub
parent 44d3770559
commit 197f79c933
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,15 +70,15 @@ export const FilmStrip: React.FunctionComponent<{
key={index} key={index}
/>) />)
}</div> }</div>
{previewImage && previewSize && previewPoint?.x !== undefined && {previewPoint?.x !== undefined &&
<div className='film-strip-hover' style={{ <div className='film-strip-hover' style={{
top: measure.bottom + 5, top: measure.bottom + 5,
left: Math.min(previewPoint!.x, measure.width - previewSize.width - 10), left: Math.min(previewPoint!.x, measure.width - (previewSize ? previewSize.width : 0) - 10),
}}> }}>
{previewPoint.action && <div className='film-strip-hover-title'>{renderAction(previewPoint.action, previewPoint.sdkLanguage)}</div>} {previewPoint.action && <div className='film-strip-hover-title'>{renderAction(previewPoint.action, previewPoint.sdkLanguage)}</div>}
<div style={{ width: previewSize.width, height: previewSize.height }}> {previewImage && previewSize && <div style={{ width: previewSize.width, height: previewSize.height }}>
<img src={`sha1/${previewImage.sha1}`} width={previewSize.width} height={previewSize.height} /> <img src={`sha1/${previewImage.sha1}`} width={previewSize.width} height={previewSize.height} />
</div> </div>}
</div> </div>
} }
</div>; </div>;