All files / src/drawing base.js

0% Statements 0/6
100% Branches 0/0
0% Functions 0/8
0% Lines 0/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38                                                                           
/**
* Copyright 2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
 
// TODO: use more abstract, non-canvas-like API
class DrawingBase {
  constructor(el) {
    this.el = el;
    this.state = {};
  }
 
  updateEl(el) {
    this.el = el;
  }
 
  // props
  font(fontName) {
    this.state.font = fontName;
  }
 
  globalAlpha(globalAlpha) {
    this.state.globalAlpha = globalAlpha;
  }
 
  startDrawingFrame() {
    this.clear();
  }
  endDrawingFrame() {}
  save(){}
  restore(){}
}
 
export default DrawingBase;