all files / candela/VisComponent/mixin/ InitSize.js

80% Statements 24/30
90.48% Branches 19/21
66.67% Functions 4/6
55.56% Lines 5/9
16 statements, 4 functions, 19 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15                      
import { getElementSize } from '../../util';
 
let InitSize = Base => class extends Base {
  constructor (...args) {
    super(...args);
 
    const size = getElementSize(this.el);
    this.width = size.width;
    this.height = size.height;
  }
};
 
export default InitSize;