Bug 1081494 Comment 12 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The current version of the code is 

```js
a = o.extend({
  name: 'PhotosetIframe',
  initialize: function (t) {
    var e = this;
    this.options = i.extend({
    }, this.defaults, t);
    var n = this.data.photoset_photos;
    this.photoset_width = this.data.shadow ? this.data.width + 20 : this.data.width,
    this.photoset = r('#photoset_' + this.data.post_id),
    window.onresize = function () {
      e.scale()
    },
    s.bool('is_mobile') || r('.photoset_photo').on('click', function () {
      return window.parent.Tumblr.Lightbox.init(n, r(this).data('photoset-index')),
      !1
    }),
    this.scale()
  },
  scale: function t() {
    var e,
    n = window.innerWith || Math.max(document.documentElement.clientWidth, document.body.clientWidth),
    t = (n / this.photoset_width).toFixed(2);
    if ('undefined' == typeof this.currentWidth || this.currentWidth !== n) {
      if (t < 1) {
        var r = (n / this.photoset_width).toFixed(2);
        this.photoset.css({
          zoom: r,
          '-moz-transform': 'scale(' + r + ')'
        })
      } else this.photoset.css({
        zoom: 1,
        '-moz-transform': 'scale(1)'
      });
      window.parent && (e = t < 1 ? Math.round(this.photoset.outerHeight() * t)  : this.photoset.outerHeight(), window.parent.postMessage('resize_photoset_iframe;' + this.data.post_id + ';' + e, '*')),
      this.currentWidth = n
    }
  }
});
```

in https://assets.tumblr.com/client/prod/standalone/photoset-iframe/index.build.js?_v=209392fcebeb03c80e519d648f406459

There are missing the `transform-origin: 0 0`.
The current version of the code is 

```js
a = o.extend({
  name: 'PhotosetIframe',
  initialize: function (t) {
    var e = this;
    this.options = i.extend({
    }, this.defaults, t);
    var n = this.data.photoset_photos;
    this.photoset_width = this.data.shadow ? this.data.width + 20 : this.data.width,
    this.photoset = r('#photoset_' + this.data.post_id),
    window.onresize = function () {
      e.scale()
    },
    s.bool('is_mobile') || r('.photoset_photo').on('click', function () {
      return window.parent.Tumblr.Lightbox.init(n, r(this).data('photoset-index')),
      !1
    }),
    this.scale()
  },
  scale: function t() {
    var e,
    n = window.innerWith || Math.max(document.documentElement.clientWidth, document.body.clientWidth),
    t = (n / this.photoset_width).toFixed(2);
    if ('undefined' == typeof this.currentWidth || this.currentWidth !== n) {
      if (t < 1) {
        var r = (n / this.photoset_width).toFixed(2);
        this.photoset.css({
          zoom: r,
          '-moz-transform': 'scale(' + r + ')'
        })
      } else this.photoset.css({
        zoom: 1,
        '-moz-transform': 'scale(1)'
      });
      window.parent && (e = t < 1 ? Math.round(this.photoset.outerHeight() * t)  : this.photoset.outerHeight(), window.parent.postMessage('resize_photoset_iframe;' + this.data.post_id + ';' + e, '*')),
      this.currentWidth = n
    }
  }
});
```

in https://assets.tumblr.com/client/prod/standalone/photoset-iframe/index.build.js?_v=209392fcebeb03c80e519d648f406459

They are missing the `transform-origin: 0 0`.

Back to Bug 1081494 Comment 12