PennController for IBEX › Forums › Support › self-paced reading with image element in the middle of the sentence › Reply To: self-paced reading with image element in the middle of the sentence
Hi Sarah,
Yes, simply stack these two commands on your Image element:
.css('transform','translateY(-50%)') .cssContainer('height','1em')
The css
command will move the element up by 50% of its size, effectively aligning its vertical midpoint with what used to be its top border. The cssContainer
command will make it occupy only 1em (the height of a standard character) without actually diminishing the image’s height.
If you look at the code of myDash
, you’ll see that it creates a Text element named “container” and, in addToDash
, you’ll see that every element is printed into it. So just do getText("container").remove()
to take it off the screen (or .hidden()
if you still want a blank space where it used to be)
Jeremy