(metaData)
| 61 | |
| 62 | // initiate current window (add metadata for custom data to store with each window instance) |
| 63 | init (metaData) |
| 64 | { |
| 65 | this.#windows = JSON.parse(localStorage.getItem("windows")) || []; |
| 66 | this.#count= localStorage.getItem("count") || 0; |
| 67 | this.#count++; |
| 68 | |
| 69 | this.#id = this.#count; |
| 70 | let shape = this.getWinShape(); |
| 71 | this.#winData = {id: this.#id, shape: shape, metaData: metaData}; |
| 72 | this.#windows.push(this.#winData); |
| 73 | |
| 74 | localStorage.setItem("count", this.#count); |
| 75 | this.updateWindowsLocalStorage(); |
| 76 | } |
| 77 | |
| 78 | getWinShape () |
| 79 | { |
no test coverage detected