Closed joemidi closed 7 years ago
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.
myImg.center();
myImg.centerHorizontal();
myImg.centerVertical();
<img>
offsetWidth
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.
If you use
myImg.center();
,myImg.centerHorizontal();
ormyImg.centerVertical();
on an<img>
type smartObject, Safari does not correctly provide anoffsetWidth
to calculate the negative margin.Example