src/data/List.js
function cloneListForMapAndSample(original, excludeDimensions) {
    var allDimensions = original.dimensions;
    var list = new List(
        zrUtil.map(allDimensions, original.getDimensionInfo, original),
        original.hostModel
    );
    // FIXME If needs stackedOn, value may already been stacked
    transferProperties(list, original);

    var storage = list._storage = {};
    var originalStorage = original._storage;

    // Init storage
    for (var i = 0; i < allDimensions.length; i++) {
        var dim = allDimensions[i];
        if (originalStorage[dim]) {
            // Notice that we do not reset invertedIndicesMap here, becuase
            // there is no scenario of mapping or sampling ordinal dimension.
            if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
                storage[dim] = cloneDimStore(originalStorage[dim]);
                list._rawExtent[dim] = getInitialExtent();
                list._extent[dim] = null;
            }
            else {
                // Direct reference for other dimensions
                storage[dim] = originalStorage[dim];
            }
        }
    }
    return list;
}
function cloneListForMapAndSample(original, excludeDimensions) {
    var allDimensions = original.dimensions;
    var list = new List(
        zrUtil.map(allDimensions, original.getDimensionInfo, original),
        original.hostModel
    );
    // FIXME If needs stackedOn, value may already been stacked
    transferProperties(list, original);

    var storage = list._storage = {};
    var originalStorage = original._storage;

    // Init storage
    for (var i = 0; i < allDimensions.length; i++) {
        var dim = allDimensions[i];
        if (originalStorage[dim]) {
            // Notice that we do not reset invertedIndicesMap here, becuase
            // there is no scenario of mapping or sampling ordinal dimension.
            if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
                storage[dim] = cloneDimStore(originalStorage[dim]);
                list._rawExtent[dim] = getInitialExtent();
                list._extent[dim] = null;
            }
            else {
                // Direct reference for other dimensions
                storage[dim] = originalStorage[dim];
            }
        }
    }
    return list;
}
function cloneListForMapAndSample ( original , excludeDimensions ) { var allDimensions = original . dimensions ; var list = new List ( zrUtil . map ( allDimensions , original . getDimensionInfo , original ) , original . hostModel ) ; // FIXME If needs stackedOn, value may already been stacked transferProperties ( list , original ) ; var storage = list . _storage = { } ; var originalStorage = original . _storage ; // Init storage for ( var i = 0 ; i < allDimensions . length ; i ++ ) { var dim = allDimensions [ i ] ; if ( originalStorage [ dim ] ) { // Notice that we do not reset invertedIndicesMap here, becuase // there is no scenario of mapping or sampling ordinal dimension. if ( zrUtil . indexOf ( excludeDimensions , dim ) >= 0 ) { storage [ dim ] = cloneDimStore ( originalStorage [ dim ] ) ; list . _rawExtent [ dim ] = getInitialExtent ( ) ; list . _extent [ dim ] = null ; } else { // Direct reference for other dimensions storage [ dim ] = originalStorage [ dim ] ; } } } return list ; }
Data in excludeDimensions is copied, otherwise transfered.
Data in excludeDimensions is copied otherwise transfered .