Skip to content

Commit

Permalink
issue planetfederal#216 - feture redrawing for custom style issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Feb 6, 2014
1 parent edb3f7b commit 0b47715
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/script/plugins/VectorStyleWriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,15 @@ gxp.plugins.VectorStyleWriter = Ext.extend(gxp.plugins.StyleWriter, {

}
// Change feature style when no custom styling or in case of custom styling if selected
var changeFeatureStyle = layer.customStyling && (featureSelected || !feature.style);
if (changeFeatureStyle) {
// Some features still may have local style object
if (feature.style) {
delete feature.style;
if (layer.customStyling) {
// Assign individual Feature style if selected or not yet a Style assigned
if (featureSelected || !feature.style) {
// Some features still may have local style object
if (feature.style) {
delete feature.style;
}
feature.style = newStyle.createSymbolizer(feature);
}
feature.style = newStyle.createSymbolizer(feature);
layer.drawFeature(feature);
} else {
// Redraw feature with Layer Style
Expand Down

0 comments on commit 0b47715

Please sign in to comment.