src/graphic/States.js
function (state, subPropKey, key, transitionCfg, done) {
        var el = this._el;
        var stateObj = subPropKey ? state[subPropKey] : state;
        var elObj = subPropKey ? el[subPropKey] : el;
        var availableProp = stateObj && (key in stateObj)
            && elObj && (key in elObj);

        var transitionAnimators = this._transitionAnimators;
        if (availableProp) {
            var obj = {};
            if (stateObj[key] === elObj[key]) {
                return 0;
            }
            obj[key] = stateObj[key];

            var animator = el.animate(subPropKey)
                .when(transitionCfg.duration, obj)
                .delay(transitionCfg.dealy)
                .done(function () {
                    var idx = zrUtil.indexOf(transitionAnimators, 1);
                    if (idx > 0) {
                        transitionAnimators.splice(idx, 1);
                    }
                    done();
                })
                .start(transitionCfg.easing);
            transitionAnimators.push(animator);

            return 1;
        }
        return 0;
    }
function (state, subPropKey, key, transitionCfg, done) {
        var el = this._el;
        var stateObj = subPropKey ? state[subPropKey] : state;
        var elObj = subPropKey ? el[subPropKey] : el;
        var availableProp = stateObj && (key in stateObj)
            && elObj && (key in elObj);

        var transitionAnimators = this._transitionAnimators;
        if (availableProp) {
            var obj = {};
            if (stateObj[key] === elObj[key]) {
                return 0;
            }
            obj[key] = stateObj[key];

            var animator = el.animate(subPropKey)
                .when(transitionCfg.duration, obj)
                .delay(transitionCfg.dealy)
                .done(function () {
                    var idx = zrUtil.indexOf(transitionAnimators, 1);
                    if (idx > 0) {
                        transitionAnimators.splice(idx, 1);
                    }
                    done();
                })
                .start(transitionCfg.easing);
            transitionAnimators.push(animator);

            return 1;
        }
        return 0;
    }
function ( state , subPropKey , key , transitionCfg , done ) { var el = this . _el ; var stateObj = subPropKey ? state [ subPropKey ] : state ; var elObj = subPropKey ? el [ subPropKey ] : el ; var availableProp = stateObj && ( key in stateObj ) && elObj && ( key in elObj ) ; var transitionAnimators = this . _transitionAnimators ; if ( availableProp ) { var obj = { } ; if ( stateObj [ key ] === elObj [ key ] ) { return 0 ; } obj [ key ] = stateObj [ key ] ; var animator = el . animate ( subPropKey ) . when ( transitionCfg . duration , obj ) . delay ( transitionCfg . dealy ) . done ( function ( ) { var idx = zrUtil . indexOf ( transitionAnimators , 1 ) ; if ( idx > 0 ) { transitionAnimators . splice ( idx , 1 ) ; } done ( ) ; } ) . start ( transitionCfg . easing ) ; transitionAnimators . push ( animator ) ; return 1 ; } return 0 ; }
Do transition animation of particular property
@param {Object} state
@param {string} subPropKey
@param {string} key
@param {Object} transitionCfg
@param {Function} done
@private
Do transition animation of particular property