Skip to content

Commit

Permalink
allow imgs to be larger and fix unified diff sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
keckelt committed Oct 23, 2023
1 parent 4db2e9b commit a085cc9
Showing 1 changed file with 46 additions and 5 deletions.
51 changes: 46 additions & 5 deletions src/Detail/ImgDetailDiff.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ export const ImgDetailDiff = ({ newCell, oldCell }: IDiffProps) => {
justifyContent: 'end'
}}
>
<img src={oldBase64} style={{ maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' }} />
<img
src={oldBase64}
style={{ maxWidth: '100%', maxHeight: '100%', height: '200%', width: '200%', objectFit: 'contain' }}
/>
</div>
<div
style={{
Expand All @@ -97,7 +100,10 @@ export const ImgDetailDiff = ({ newCell, oldCell }: IDiffProps) => {
height: '100%'
}}
>
<img src={newBase64} style={{ maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' }} />
<img
src={newBase64}
style={{ maxWidth: '100%', maxHeight: '100%', height: '200%', width: '200%', objectFit: 'contain' }}
/>
</div>
</div>
);
Expand All @@ -120,12 +126,47 @@ export const ImgDetailDiff = ({ newCell, oldCell }: IDiffProps) => {
/>
&nbsp;New
</label>
<div style={{ position: 'relative', width: '50%', flexGrow: 1, flexShrink: 1 }}>
<img src={oldBase64} style={{ height: '100%' }} />
<div style={{ position: 'relative', width: '80%', flexGrow: 1, flexShrink: 1 }}>
<div
style={{
position: 'absolute',
top: 0,
left: '10%',
width: '80%',
height: '100%'
}}
>
<img
src={oldBase64}
style={{ maxWidth: '100%', maxHeight: '100%', height: '200%', width: '200%', objectFit: 'contain' }}
/>
</div>
<div
style={{
position: 'absolute',
top: 0,
left: '10%',
width: '80%',
height: '100%'
}}
>
<img
src={newBase64}
style={{
maxWidth: '100%',
maxHeight: '100%',
height: '200%',
width: '200%',
objectFit: 'contain',
opacity: transparency
}}
/>
</div>
{/* <img src={oldBase64} style={{ height: '100%' }} />
<img
src={newBase64}
style={{ height: '100%', position: 'absolute', bottom: 0, left: 0, opacity: transparency }}
/>
/> */}
</div>
</div>
);
Expand Down

0 comments on commit a085cc9

Please sign in to comment.