1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1× 1× 1× 1× 1× | import Resize from './Resize'; import InitSize from './InitSize'; let AutoResize = Base => class extends Resize(InitSize(Base)) { constructor (...args) { super(...args); this.on('resize', (w, h) => { this.width = w; this.height = h; this.render(); }); } }; export default AutoResize; |