bannertime / generator-bannertime

Yeoman generator to help build and manage HTML5 banner campaigns.
https://bannertime.github.io/
58 stars 35 forks source link

docs: img type requires width and height #72

Closed joemidi closed 7 years ago

joemidi commented 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.

Example

  this.myImg = this.smartObject({
    type: 'img',
    src: 'images/my-img.png',
    alt: '',
    width: 200,
    height: 100,
    parent: this.banner
  });
joemidi commented 7 years ago

Moving this to the docs repo.