* Initializes styles * * @private
()
| 64 | * @private |
| 65 | */ |
| 66 | initStyles () { |
| 67 | if (!this.ready()) return; |
| 68 | |
| 69 | this.container.style.position = "relative"; |
| 70 | const items = this.items(); |
| 71 | |
| 72 | for (let i = 0; i < items.length; i++) { |
| 73 | if (this.styledItems.has(items[i])) continue; |
| 74 | |
| 75 | let style = items[i].style; |
| 76 | |
| 77 | style.position = "absolute"; |
| 78 | |
| 79 | if (this.animate) { |
| 80 | style.transition = `${this.useTransform ? "transform" : "top, left"} 0.2s ease`; |
| 81 | } |
| 82 | |
| 83 | this.styledItems.add(items[i]); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Gets a collection of all items in a grid. |
no test coverage detected