* Adds and anchor to be updated during resize * @param {ScaledEntity | ScaledEntity[]} entity * @memberof SafeScaleManager
(entity)
| 151 | * @memberof SafeScaleManager |
| 152 | */ |
| 153 | addEntity(entity) { |
| 154 | if (!Array.isArray(entity)) { |
| 155 | entity = [entity]; |
| 156 | } |
| 157 | |
| 158 | entity.forEach(e => { |
| 159 | if (this.entities.includes(e)) { |
| 160 | return; |
| 161 | } |
| 162 | |
| 163 | if (this.resizeEventData) { |
| 164 | e.onResize(this.resizeEventData); |
| 165 | } |
| 166 | |
| 167 | this.entities.push(e); |
| 168 | }); |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Removes an anchor |
no test coverage detected