import Resize from './Resize';

let AutoResize = Base => class extends Resize(Base) {
  constructor (...args) {
    super(...args);

    this.on('resize', (w, h) => {
      this.width = w;
      this.height = h;

      this.render();
    });
  }
};

export default AutoResize;

import Resize from './Resize';
import InitSize from './InitSize';

let AutoResize = Base => class extends Resize(SizeInit(Base)) {
  constructor (...args) {
    super(...args);

    this.on('resize', (w, h) => {
      this.width = w;
      this.height = h;

      this.render();
    });
  }
};

export default AutoResize;

Make Resize mixin extend InitSize mixin