Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix incorrect prop name in Layertree widget #132

Merged
merged 3 commits into from

2 participants

Alex Saunier Éric Lemoine
Alex Saunier
Collaborator

The name of the property containing the WMS layers general options has recently been changed from wmsOptions to wmsConfig in the code section defining the WMS overlays - but not in the class properties list. If it is not on purpose, I suggest to go back to wmsOptions because OL doc talks about "options" (not "config") + to avoid breaking existing projects using the old prop name.

By the way, I have fixed the prop API doc to make them appear in http://docs.camptocamp.net/cgxp/lib/widgets/tree/LayerTree.html

core/src/script/CGXP/widgets/tree/LayerTree.js
@@ -62,7 +62,7 @@ cgxp.tree.LayerTree = Ext.extend(Ext.tree.TreePanel, {
/** api: config[frienlyUrl]
* ``Boolean``
- * True to enable friendly url support (HTML5 browers only), default to true.
+ * True to enable friendly URL support (HTML5 browers only), default to true.
Éric Lemoine Owner
elemoine added a note

browers -> browsers (while you're at it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Éric Lemoine
Owner

Please merge. Thanks.

Alex Saunier asaunier merged commit d62ab17 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 3, 2012
  1. Alex Saunier

    fix incorrect prop name

    asaunier authored
  2. Alex Saunier

    improvement of API doc

    asaunier authored
Commits on Jul 4, 2012
  1. Alex Saunier

    typo

    asaunier authored
This page is out of date. Refresh to see the latest.
Showing with 21 additions and 18 deletions.
  1. +21 −18 core/src/script/CGXP/widgets/tree/LayerTree.js
39 core/src/script/CGXP/widgets/tree/LayerTree.js
View
@@ -55,14 +55,14 @@ cgxp.tree.LayerTree = Ext.extend(Ext.tree.TreePanel, {
useArrows: true,
/** api: config[uniqueTheme]
- * ``Boolean``
- * True to have only one theme on the layer tree, default to false.
+ * ``Boolean``
+ * True to have only one theme on the layer tree, default to false.
*/
uniqueTheme: false,
/** api: config[frienlyUrl]
- * ``Boolean``
- * True to enable friendly url support (HTML5 browers only), default to true.
+ * ``Boolean``
+ * True to enable friendly URL support (HTML5 browsers only), default to true.
*/
frienlyUrl: true,
@@ -71,27 +71,27 @@ cgxp.tree.LayerTree = Ext.extend(Ext.tree.TreePanel, {
*/
mapPanel: null,
- /**
- * Property: themes
- * The initialConfig of themes
+ /** api: config[themes]
+ * ``Object``
+ * The initialConfig of themes
*/
themes: null,
- /**
- * Property: defaultThemes
- * The themes to load on start up
+ /** api: config[defaultThemes]
+ * ``Array of strings``
+ * The themes to load on start up
*/
defaultThemes: null,
- /**
- * Property: wmsURL
- * The url to the WMS service
+ /** api: config[wmsURL]
+ * ``String``
+ * The URL of the WMS service
*/
wmsURL: null,
- /**
- * Property: wmsOptions
- * Optional global configuration for WMS layers
+ /** api: config[wmsOptions]
+ * ``Object``
+ * Optional global configuration for WMS layers
*/
wmsOptions: null,
@@ -110,7 +110,10 @@ cgxp.tree.LayerTree = Ext.extend(Ext.tree.TreePanel, {
*/
stateEvents: ["addgroup", "ordergroup", "removegroup", "themeopacitychange", "layervisibilitychange"],
- // used for the permalink
+ /** api: config[stateId]
+ * ``String``
+ * Prefix of parameters in the permalinks
+ */
stateId: 'tree',
/** private: property[recordType]
@@ -978,7 +981,7 @@ cgxp.tree.LayerTree = Ext.extend(Ext.tree.TreePanel, {
visibility: false,
singleTile: true,
isBaseLayer: false
- }, this.wmsConfig || {})
+ }, this.wmsOptions || {})
);
var result = {
Something went wrong with that request. Please try again.