(f)
| 164 | }; |
| 165 | |
| 166 | const init = (f) => { |
| 167 | // save some of the original CSS properties before we change them |
| 168 | f.originalStyle = { |
| 169 | whiteSpace: f.element.style.whiteSpace, |
| 170 | display: f.element.style.display, |
| 171 | fontSize: f.element.style.fontSize, |
| 172 | }; |
| 173 | |
| 174 | // should we observe DOM mutations |
| 175 | observeMutations(f); |
| 176 | |
| 177 | // this is a new fitty so we need to validate if it's styles are in order |
| 178 | f.newbie = true; |
| 179 | |
| 180 | // because it's a new fitty it should also be dirty, we want it to redraw on the first loop |
| 181 | f.dirty = true; |
| 182 | |
| 183 | // we want to be able to update this fitty |
| 184 | fitties.push(f); |
| 185 | }; |
| 186 | |
| 187 | const destroy = (f) => () => { |
| 188 | // remove from fitties array |
no test coverage detected
searching dependent graphs…