Skip to content

Commit

Permalink
Remove jQuery .attr from the image diff again (#30022)
Browse files Browse the repository at this point in the history
- Follows go-gitea/gitea#29917

Missed these

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit d0d7b4b6d124dd8fd420a5f3850e37794e09e302)
  • Loading branch information
yardenshoham authored and earl-warren committed Mar 26, 2024
1 parent 7092ffc commit a395806
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web_src/js/features/imagediff.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit a395806

Please sign in to comment.