edit.* ControllerState documentation

This commit is contained in:
Richard Fairhurst
2012-07-12 17:01:31 +01:00
parent 39ae1fe2a7
commit 372d13bf62
5 changed files with 13 additions and 3 deletions

View File

@@ -11,9 +11,14 @@ declare("iD.controller.edit.EditBaseState", [iD.controller.ControllerState], {
editortooltip: null,
constructor:function() {
// summary: Base state for the 'Edit object' states - where an object is selected and the user is making changes to it.
},
openEditorTooltip:function(x,y,entity) {
// summary: Open the initial 'Edit tags/Edit shape' tooltip.
// x: Number Screen co-ordinate.
// y: Number Screen co-ordinate.
// entity: iD.Entity The entity to be edited.
var h=entity.friendlyName(); h = (h=='') ? h : h+"<br/>";
this.editortooltip = new dijit.TooltipDialog({
content: h+"<button data-dojo-type='dijit.form.Button' type='submit'>Edit tags</button> "
@@ -24,6 +29,7 @@ declare("iD.controller.edit.EditBaseState", [iD.controller.ControllerState], {
},
closeEditorTooltip:function() {
// summary: Close the tooltip.
if (this.editortooltip) { dijit.popup.close(this.editortooltip); }
},

View File

@@ -8,11 +8,12 @@ define(['dojo/_base/declare',
], function(declare){
// ----------------------------------------------------------------------
// ControllerState base class
// edit.NoSelection class
declare("iD.controller.edit.NoSelection", [iD.controller.edit.EditBaseState], {
constructor:function() {
// summary: In 'Edit object' mode but nothing selected.
},
enterState:function() {

View File

@@ -3,7 +3,7 @@
define(['dojo/_base/declare','iD/controller/edit/EditBaseState'], function(declare){
// ----------------------------------------------------------------------
// SelectedPOINode class
// edit.SelectedPOINode class
declare("iD.controller.edit.SelectedPOINode", [iD.controller.edit.EditBaseState], {
@@ -11,6 +11,7 @@ declare("iD.controller.edit.SelectedPOINode", [iD.controller.edit.EditBaseState]
nodeUI: null,
constructor:function(_node) {
// summary: In 'Edit object' mode and a POI node is selected.
this.node=_node;
},
enterState:function() {

View File

@@ -3,7 +3,7 @@
define(['dojo/_base/declare','iD/controller/edit/EditBaseState'], function(declare){
// ----------------------------------------------------------------------
// SelectedWay class
// edit.SelectedWay class
declare("iD.controller.edit.SelectedWay", [iD.controller.edit.EditBaseState], {
@@ -12,6 +12,7 @@ declare("iD.controller.edit.SelectedWay", [iD.controller.edit.EditBaseState], {
entryevent: null,
constructor:function(_way,_event) {
// summary: In 'Edit object' mode and a way is selected.
this.way=_way;
this.entryevent=_event;
},

View File

@@ -11,6 +11,7 @@ declare("iD.controller.edit.SelectedWayNode", [iD.controller.edit.EditBaseState]
way: null,
constructor:function(_node,_way) {
// summary: In 'Edit object' mode and a node in a way is selected.
this.node=_node;
this.way=_way;
},