(data, options, add_to_container)
| 17 | /* Constructor |
| 18 | ================================================== */ |
| 19 | constructor(data, options, add_to_container) { |
| 20 | // DOM ELEMENTS |
| 21 | this._el = { |
| 22 | parent: {}, |
| 23 | container: {}, |
| 24 | message_container: {}, |
| 25 | loading_icon: {}, |
| 26 | message: {} |
| 27 | }; |
| 28 | |
| 29 | //Options |
| 30 | this.options = { |
| 31 | width: 600, |
| 32 | height: 600, |
| 33 | message_class: "vco-message", |
| 34 | message_icon_class: "vco-loading-icon" |
| 35 | }; |
| 36 | |
| 37 | // Merge Data and Options |
| 38 | mergeData(this.data, data); |
| 39 | mergeData(this.options, options); |
| 40 | |
| 41 | this._el.container = Dom.create("div", this.options.message_class); |
| 42 | |
| 43 | if (add_to_container) { |
| 44 | add_to_container.appendChild(this._el.container); |
| 45 | this._el.parent = add_to_container; |
| 46 | }; |
| 47 | |
| 48 | |
| 49 | // Animation |
| 50 | this.animator = {}; |
| 51 | |
| 52 | |
| 53 | this._initLayout(); |
| 54 | this._initEvents(); |
| 55 | } |
| 56 | |
| 57 | /* Public |
| 58 | ================================================== */ |
nothing calls this directly
no test coverage detected