bannertime / generator-bannertime

Yeoman generator to help build and manage HTML5 banner campaigns.

Home Page:https://bannertime.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.