summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/imagediff.js
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2024-03-23 13:51:34 +0200
committerGitHub <noreply@github.com>2024-03-23 12:51:34 +0100
commitd0d7b4b6d124dd8fd420a5f3850e37794e09e302 (patch)
tree800a695cf29484adecc75a6a5fdfdb47173dc4ee /web_src/js/features/imagediff.js
parent3ccda41a539b8ba7841919ee12dc2877ddc03818 (diff)
downloadgitea-d0d7b4b6d124dd8fd420a5f3850e37794e09e302.tar.gz
gitea-d0d7b4b6d124dd8fd420a5f3850e37794e09e302.zip
Remove jQuery `.attr` from the image diff again (#30022)
- Follows https://github.com/go-gitea/gitea/pull/29917 Missed these Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Diffstat (limited to 'web_src/js/features/imagediff.js')
-rw-r--r--web_src/js/features/imagediff.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/web_src/js/features/imagediff.js b/web_src/js/features/imagediff.js
index 7b77b30ccc..d567632f5f 100644
--- a/web_src/js/features/imagediff.js
+++ b/web_src/js/features/imagediff.js
@@ -98,8 +98,10 @@ export function initImageDiff() {
const text = await resp.text();
const bounds = getDefaultSvgBoundsIfUndefined(text, info.path);
if (bounds) {
- info.$images.attr('width', bounds.width);
- info.$images.attr('height', bounds.height);
+ info.$images.each(function() {
+ this.setAttribute('width', bounds.width);
+ this.setAttribute('height', bounds.height);
+ });
hideElem(info.$boundsInfo);
}
}