[Commits] r1793 - sandbox/redlining/ux/FeatureEditing/ux/widgets/form
commits at geoext.org
commits at geoext.org
Thu Jan 21 12:18:22 CET 2010
Author: fredj
Date: 2010-01-21 12:18:21 +0100 (Thu, 21 Jan 2010)
New Revision: 1793
Modified:
sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js
Log:
add an optional layerOptions config option in RedLiningPanel. this object is passed to the Cosmetic layer constuctor.
Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js 2010-01-21 10:28:26 UTC (rev 1792)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js 2010-01-21 11:18:21 UTC (rev 1793)
@@ -41,6 +41,12 @@
*/
layer: null,
+ /** api: config[layerOptions]
+ * ``Object``
+ * Options to be passed to the cosmetic OpenLayers.Layer.Vector constructor.
+ */
+ layerOptions: {},
+
/** api: config[fadeRatio]
* ``Numeric``
* The fade ratio to apply when features are not selected.
@@ -132,9 +138,11 @@
"normal": style,
"faded": fadedStyle
});
-
- layer = new OpenLayers.Layer.Vector(
- "Cosmetic", {'styleMap': this.styleMap});
+
+ this.layerOptions = OpenLayers.Util.applyDefaults(this.layerOptions, {
+ styleMap: this.styleMap
+ });
+ layer = new OpenLayers.Layer.Vector("Cosmetic", this.layerOptions);
}
this.layers = [layer];
More information about the Commits
mailing list