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>
(cherry picked from commit d0d7b4b6d124dd8fd420a5f3850e37794e09e302)
This commit is contained in:
Yarden Shoham 2024-03-23 13:51:34 +02:00 committed by Earl Warren
parent 7092ffc5dd
commit a395806812
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00

View File

@ -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);
}
}