docs: img type requires width and height
joemidi opened this issue · comments
If you use myImg.center();
, myImg.centerHorizontal();
or myImg.centerVertical();
on an <img>
type smartObject, Safari does not correctly provide an offsetWidth
to calculate the negative margin.
Example
this.myImg = this.smartObject({
type: 'img',
src: 'images/my-img.png',
alt: '',
width: 200,
height: 100,
parent: this.banner
});
Moving this to the docs repo.