Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ function extractColorFromStyleProperty(colorStyleProperty, defaultColor) {
return colorStyleProperty.options.color;
}

// Do not use dynamic color unless configuration is complete
if (!colorStyleProperty.options.field || !colorStyleProperty.options.field.name) {
return defaultColor;
}

// return middle of gradient for dynamic style property
return getColorRampCenterColor(colorStyleProperty.options.color);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const defaultProps = {
type: VectorStyle.STYLE_TYPE.DYNAMIC,
options: {
color: 'Blues',
field: {
name: 'prop1'
}
}
}
};
Expand Down