# all files / candela/VisComponent/mixin/ AutoResize.js

80.56% Statements 29/36
100% Branches 23/23
62.5% Functions 5/8
54.55% Lines 6/11
16 statements, 4 functions, 20 branches Ignored

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    191×
    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;