reorderTarget (targetIndex, newIndex) {
        this.emit('reorderTarget*');
        let targets = this.runtime.targets;
        targetIndex = MathUtil.clamp(targetIndex, 0, targets.length - 1);
        newIndex = MathUtil.clamp(newIndex, 0, targets.length - 1);
        if (targetIndex === newIndex) return false;
        const target = targets[targetIndex];
        targets = targets.slice(0, targetIndex).concat(targets.slice(targetIndex + 1));
        targets.splice(newIndex, 0, target);
        this.runtime.targets = targets;
        this.emitTargetsUpdate();
        return true;
    }
/**
     * Reorder target by index. Return whether a change was made.
     * @param {!string} targetIndex Index of the target.
     * @param {!number} newIndex index that the target should be moved to.
     * @returns {boolean} Whether a target was reordered.
     */
Reorder target by index. Return whether a change was made.
@param {!string} targetIndex Index of the target.
@param {!number} newIndex index that the target should be moved to.
@returns {boolean} Whether a target was reordered.
Reorder target by index . Return whether a change was made . @param { !string } targetIndex Index of the target . @param { !number } newIndex index that the target should be moved to . @returns { boolean } Whether a target was reordered .
reorderTarget (targetIndex, newIndex) {
        this.emit('reorderTarget*');
        let targets = this.runtime.targets;
        targetIndex = MathUtil.clamp(targetIndex, 0, targets.length - 1);
        newIndex = MathUtil.clamp(newIndex, 0, targets.length - 1);
        if (targetIndex === newIndex) return false;
        const target = targets[targetIndex];
        targets = targets.slice(0, targetIndex).concat(targets.slice(targetIndex + 1));
        targets.splice(newIndex, 0, target);
        this.runtime.targets = targets;
        this.emitTargetsUpdate();
        return true;
    }
reorderTarget ( targetIndex , newIndex ) { this . emit ( 'reorderTarget*' ) ; let targets = this . runtime . targets ; targetIndex = MathUtil . clamp ( targetIndex , 0 , targets . length - 1 ) ; newIndex = MathUtil . clamp ( newIndex , 0 , targets . length - 1 ) ; if ( targetIndex === newIndex ) return false ; const target = targets [ targetIndex ] ; targets = targets . slice ( 0 , targetIndex ) . concat ( targets . slice ( targetIndex + 1 ) ) ; targets . splice ( newIndex , 0 , target ) ; this . runtime . targets = targets ; this . emitTargetsUpdate ( ) ; return true ; }
Reorder target by index.
Reorder target by index .