function animateToShallow(animatable, path, source, target, time, delay, reverse) {
    var objShallow = {};
    var propertyCount = 0;
    for (var name in target) {
        if (!target.hasOwnProperty(name)) {
            continue;
        }

        if (source[name] != null) {
            if (isObject(target[name]) && !isArrayLike(target[name])) {
                animateToShallow(
                    animatable,
                    path ? path + '.' + name : name,
                    source[name],
                    target[name],
                    time,
                    delay,
                    reverse
                );
            }
            else {
                if (reverse) {
                    objShallow[name] = source[name];
                    setAttrByPath(animatable, path, name, target[name]);
                }
                else {
                    objShallow[name] = target[name];
                }
                propertyCount++;
            }
        }
        else if (target[name] != null && !reverse) {
            setAttrByPath(animatable, path, name, target[name]);
        }
    }

    if (propertyCount > 0) {
        animatable.animate(path, false)
            .when(time == null ? 500 : time, objShallow)
            .delay(delay || 0);
    }
}
function animateToShallow(animatable, path, source, target, time, delay, reverse) {
    var objShallow = {};
    var propertyCount = 0;
    for (var name in target) {
        if (!target.hasOwnProperty(name)) {
            continue;
        }

        if (source[name] != null) {
            if (isObject(target[name]) && !isArrayLike(target[name])) {
                animateToShallow(
                    animatable,
                    path ? path + '.' + name : name,
                    source[name],
                    target[name],
                    time,
                    delay,
                    reverse
                );
            }
            else {
                if (reverse) {
                    objShallow[name] = source[name];
                    setAttrByPath(animatable, path, name, target[name]);
                }
                else {
                    objShallow[name] = target[name];
                }
                propertyCount++;
            }
        }
        else if (target[name] != null && !reverse) {
            setAttrByPath(animatable, path, name, target[name]);
        }
    }

    if (propertyCount > 0) {
        animatable.animate(path, false)
            .when(time == null ? 500 : time, objShallow)
            .delay(delay || 0);
    }
}
function animateToShallow ( animatable , path , source , target , time , delay , reverse ) { var objShallow = { } ; var propertyCount = 0 ; for ( var name in target ) { if ( ! target . hasOwnProperty ( name ) ) { continue ; } if ( source [ name ] != null ) { if ( isObject ( target [ name ] ) && ! isArrayLike ( target [ name ] ) ) { animateToShallow ( animatable , path ? path + '.' + name : name , source [ name ] , target [ name ] , time , delay , reverse ) ; } else { if ( reverse ) { objShallow [ name ] = source [ name ] ; setAttrByPath ( animatable , path , name , target [ name ] ) ; } else { objShallow [ name ] = target [ name ] ; } propertyCount ++ ; } } else if ( target [ name ] != null && ! reverse ) { setAttrByPath ( animatable , path , name , target [ name ] ) ; } } if ( propertyCount > 0 ) { animatable . animate ( path , false ) . when ( time == null ? 500 : time , objShallow ) . delay ( delay || 0 ) ; } }
@param {string} path=''
@param {Object} source=animatable
@param {Object} target
@param {number} [time=500]
@param {number} [delay=0]
@param {boolean} [reverse] If `true`, animate
from the `target` to current state.

@example
// Animate position
el._animateToShallow({
position: [10, 10]
})

// Animate shape, style and position in 100ms, delayed 100ms
el._animateToShallow({
shape: {
width: 500
},
style: {
fill: 'red'
}
position: [10, 10]
}, 100, 100)
@param { string } path = @param { Object } source = animatable @param { Object } target @param { number } [ time = 500 ] @param { number } [ delay = 0 ] @param { boolean } [ reverse ] If true animate from the target to current state .
Animates to shallow