mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 19:44:38 +01:00
parent
cdb81f32ac
commit
8fee7c46c1
1 changed files with 2 additions and 1 deletions
|
@ -67,7 +67,8 @@ export default function initImageDiff() {
|
|||
$('.image-diff').each(function() {
|
||||
const $container = $(this);
|
||||
|
||||
const diffContainerWidth = $container.width() - 300;
|
||||
// the container may be hidden by "viewed" checkbox, so use the parent's width for reference
|
||||
const diffContainerWidth = Math.max($container.closest('.diff-file-box').width() - 300, 100);
|
||||
const pathAfter = $container.data('path-after');
|
||||
const pathBefore = $container.data('path-before');
|
||||
|
||||
|
|
Loading…
Reference in a new issue