Create anonymous functions in an execution context with limited scope
This commit is contained in:
+2
-6
@@ -266,9 +266,7 @@ ol.feature.createFeatureStyleFunction = function(obj) {
|
|||||||
goog.asserts.assertInstanceof(obj, ol.style.Style);
|
goog.asserts.assertInstanceof(obj, ol.style.Style);
|
||||||
styles = [obj];
|
styles = [obj];
|
||||||
}
|
}
|
||||||
styleFunction = function(resolution) {
|
styleFunction = goog.functions.constant(styles);
|
||||||
return styles;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
return styleFunction;
|
return styleFunction;
|
||||||
};
|
};
|
||||||
@@ -301,9 +299,7 @@ ol.feature.createStyleFunction = function(obj) {
|
|||||||
goog.asserts.assertInstanceof(obj, ol.style.Style);
|
goog.asserts.assertInstanceof(obj, ol.style.Style);
|
||||||
styles = [obj];
|
styles = [obj];
|
||||||
}
|
}
|
||||||
styleFunction = function(feature, resolution) {
|
styleFunction = goog.functions.constant(styles);
|
||||||
return styles;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
return styleFunction;
|
return styleFunction;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user