* Moves children from current parent to different one. * * @param {?Tutorial} parent - New parent. If null, the tutorial has no parent.
(parent)
| 57 | * @param {?Tutorial} parent - New parent. If null, the tutorial has no parent. |
| 58 | */ |
| 59 | setParent(parent) { |
| 60 | // removes node from old parent |
| 61 | if (this.parent) { |
| 62 | removeChild(this.parent, this); |
| 63 | } |
| 64 | |
| 65 | this.parent = parent; |
| 66 | if (parent) { |
| 67 | addChild(parent, this); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | /* eslint-disable class-methods-use-this */ |
| 72 | /** |
no test coverage detected