Skip to content

Commit

Permalink
Merge pull request #211 from lsst-ts/tickets/DM-46084
Browse files Browse the repository at this point in the history
DM-46084: Apply responsive class to updated images
  • Loading branch information
ugyballoons committed Sep 3, 2024
2 parents a0fd509 + 48bed50 commit 4ae3206
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/pages/current.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _getById } from '../modules/utils'
import { _getById, _elWithClass } from '../modules/utils'
import { WebsocketClient } from '../modules/ws-service-client'

(function () {
Expand All @@ -21,7 +21,8 @@ import { WebsocketClient } from '../modules/ws-service-client'
_getById('seqNum').textContent = newEvent.seq_num
_getById('eventName').textContent = filename
const oldImg = _getById('eventImage')
const newImg = document.createElement('img')
// create new responsive <img> element
const newImg = _elWithClass('img', 'resp')
const imgURL = `${baseImgURL}/${filename}`
newImg.src = imgURL
newImg.id = oldImg.id
Expand Down

0 comments on commit 4ae3206

Please sign in to comment.