mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 04:43:59 +01:00
Backport #25675 by @delvh Regression of #25672. Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
491f36d32a
commit
4e310133f9
1 changed files with 2 additions and 1 deletions
|
@ -65,8 +65,9 @@ export function initImageDiff() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.image-diff').each(function() {
|
$('.image-diff:not([data-image-diff-loaded])').each(function() {
|
||||||
const $container = $(this);
|
const $container = $(this);
|
||||||
|
$container.attr('data-image-diff-loaded', 'true');
|
||||||
|
|
||||||
// the container may be hidden by "viewed" checkbox, so use the parent's width for reference
|
// 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 diffContainerWidth = Math.max($container.closest('.diff-file-box').width() - 300, 100);
|
||||||
|
|
Loading…
Reference in a new issue