(source: T)
| 25 | } |
| 26 | |
| 27 | setValue(source: T) { |
| 28 | const payload = this.getPayload() |
| 29 | // Reuse the payload when lengths are equal. |
| 30 | if (source.length == payload.length) { |
| 31 | return payload.map((node, i) => node.setValue(source[i])).some(Boolean) |
| 32 | } |
| 33 | // Remake the payload when length changes. |
| 34 | super.setValue(source.map(makeAnimated)) |
| 35 | return true |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | function makeAnimated(value: any) { |
no test coverage detected