Skip to content

Commit

Permalink
Add createOnly config option to feature editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart van den Eijnden committed Mar 2, 2015
1 parent b10596e commit 659e660
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/script/plugins/FeatureEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ gxp.plugins.FeatureEditor = Ext.extend(gxp.plugins.ClickableFeatures, {
* modify tool, i.e. there is no option to add new features.
*/
modifyOnly: false,

/** api: config[createOnly]
* ``Boolean`` Set to true to use the FeatureEditor merely as a feature
* creation tool, i.e. there is no option to modify existing features.
*/
createOnly: false,

/** api: config[showSelectedOnly]
* ``Boolean`` If set to true, only selected features will be displayed
Expand Down Expand Up @@ -726,6 +732,7 @@ gxp.plugins.FeatureEditor = Ext.extend(gxp.plugins.ClickableFeatures, {
//TODO Tool.js sets group, but this doesn't work for GeoExt.Action
group: toggleGroup,
groupClass: null,
hidden: this.createOnly,
enableToggle: true,
allowDepress: true,
control: this.selectControl,
Expand Down

0 comments on commit 659e660

Please sign in to comment.