* * @param {Object} data
(data)
| 52 | * @param {Object} data |
| 53 | */ |
| 54 | onMoveVideoButtonClick(data) { |
| 55 | let me = this, |
| 56 | container1 = me.getReference('container-1'), |
| 57 | container2 = me.getReference('container-2'), |
| 58 | videoWrapper = me.getReference('video-wrapper'); |
| 59 | |
| 60 | container1.silentVdomUpdate = true; |
| 61 | container2.silentVdomUpdate = true; |
| 62 | |
| 63 | if (container2.items.length < 1) { |
| 64 | container2.add(container1.removeAt(0, false)) |
| 65 | } else { |
| 66 | container1.add(container2.removeAt(0, false)) |
| 67 | } |
| 68 | |
| 69 | // include 2 level of children: |
| 70 | // level 1 => container-1, container-2 |
| 71 | // level 2 => video element(s) |
| 72 | videoWrapper.updateDepth = 3; |
| 73 | |
| 74 | videoWrapper.promiseUpdate().then(() => { |
| 75 | container1.silentVdomUpdate = false; |
| 76 | container2.silentVdomUpdate = false |
| 77 | }) |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | export default Neo.setupClass(MainContainer); |
nothing calls this directly
no test coverage detected