src/util/symbol.js
function symbolPathSetColor(color, innerColor) {
    if (this.type !== 'image') {
        var symbolStyle = this.style;
        var symbolShape = this.shape;
        if (symbolShape && symbolShape.symbolType === 'line') {
            symbolStyle.stroke = color;
        }
        else if (this.__isEmptyBrush) {
            symbolStyle.stroke = color;
            symbolStyle.fill = innerColor || '#fff';
        }
        else {
            // FIXME 判断图形默认是填充还是描边，使用 onlyStroke ?
            symbolStyle.fill && (symbolStyle.fill = color);
            symbolStyle.stroke && (symbolStyle.stroke = color);
        }
        this.dirty(false);
    }
}
function symbolPathSetColor(color, innerColor) {
    if (this.type !== 'image') {
        var symbolStyle = this.style;
        var symbolShape = this.shape;
        if (symbolShape && symbolShape.symbolType === 'line') {
            symbolStyle.stroke = color;
        }
        else if (this.__isEmptyBrush) {
            symbolStyle.stroke = color;
            symbolStyle.fill = innerColor || '#fff';
        }
        else {
            // FIXME 判断图形默认是填充还是描边，使用 onlyStroke ?
            symbolStyle.fill && (symbolStyle.fill = color);
            symbolStyle.stroke && (symbolStyle.stroke = color);
        }
        this.dirty(false);
    }
}
function symbolPathSetColor ( color , innerColor ) { if ( this . type !== 'image' ) { var symbolStyle = this . style ; var symbolShape = this . shape ; if ( symbolShape && symbolShape . symbolType === 'line' ) { symbolStyle . stroke = color ; } else if ( this . __isEmptyBrush ) { symbolStyle . stroke = color ; symbolStyle . fill = innerColor || '#fff' ; } else { // FIXME 判断图形默认是填充还是描边，使用 onlyStroke ? symbolStyle . fill && ( symbolStyle . fill = color ) ; symbolStyle . stroke && ( symbolStyle . stroke = color ) ; } this . dirty ( false ) ; } }
Provide setColor helper method to avoid determine if set the fill or stroke outside
Provide setColor helper method to avoid determine if set the fill or stroke outside