(elem, options, language)
| 15 | |
| 16 | export class TimeAxis { |
| 17 | constructor(elem, options, language) { |
| 18 | |
| 19 | if (language) { |
| 20 | this.setLanguage(language) |
| 21 | } |
| 22 | // DOM Elements |
| 23 | this._el = { |
| 24 | container: {}, |
| 25 | content_container: {}, |
| 26 | major: {}, |
| 27 | minor: {}, |
| 28 | }; |
| 29 | |
| 30 | // Components |
| 31 | this._text = {}; |
| 32 | |
| 33 | // State |
| 34 | this._state = { |
| 35 | loaded: false |
| 36 | }; |
| 37 | |
| 38 | |
| 39 | // Data |
| 40 | this.data = {}; |
| 41 | |
| 42 | // Options |
| 43 | this.options = { |
| 44 | duration: 1000, |
| 45 | ease: easeInSpline, |
| 46 | width: 600, |
| 47 | height: 600 |
| 48 | }; |
| 49 | |
| 50 | // Actively Displaying |
| 51 | this.active = false; |
| 52 | |
| 53 | // Animation Object |
| 54 | this.animator = {}; |
| 55 | |
| 56 | // Axis Helper |
| 57 | this.axis_helper = {}; |
| 58 | |
| 59 | // Minor tick dom element array |
| 60 | this.minor_ticks = []; |
| 61 | |
| 62 | // Minor tick dom element array |
| 63 | this.major_ticks = []; |
| 64 | |
| 65 | // Main element |
| 66 | if (typeof elem === 'object') { |
| 67 | this._el.container = elem; |
| 68 | } else { |
| 69 | this._el.container = DOM.get(elem); |
| 70 | } |
| 71 | |
| 72 | // Merge Data and Options |
| 73 | mergeData(this.options, options); |
| 74 |
nothing calls this directly
no test coverage detected