diff options
| author | Alon Levy <alon@pobox.com> | 2015-01-13 11:35:21 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-01-13 11:35:21 +0200 |
| commit | 0bf945e1f6796a0af53149682e225540ad64a3f2 (patch) | |
| tree | 71e486ae93b75a01bf4e41b1b8b9c855d6a4dcdc /src/client | |
| parent | f17c7d27b510c033aa2861598e49a90c56aa9a13 (diff) | |
client/graph: editType: drop state
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/model/graph.js | 13 | ||||
| -rw-r--r-- | src/client/textanalysis.ui.js | 2 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/client/model/graph.js b/src/client/model/graph.js index 0c120b8c..23ee237b 100644 --- a/src/client/model/graph.js +++ b/src/client/model/graph.js @@ -496,8 +496,8 @@ function Graph(spec) { * * @return true if type changed */ - this.editType = function(id, state, newtype) { - return this._editProperty(id, state, 'type', newtype); + this.editType = function(id, newtype) { + return this._editProperty(id, 'type', newtype); } function new_attr_diff_prop_value(id, prop, value) @@ -508,21 +508,14 @@ function Graph(spec) { return diff; } - this._editProperty = function(id, state, prop, value) { + this._editProperty = function(id, prop, value) { var n = find_node__by_id(id); - if (state !== null && state != n.state){ - return false; - } - if ((n === undefined)) { return false; } console.debug("deprecated and broken probably"); // cannot assert state is temp since robot code still uses it - if (state != 'temp') { - console.log('warning: I hope robot is doing this not-through-backend property change'); - } n[prop] = value; diffBus.push(new_attr_diff_prop_value(id, prop, value)); return true; diff --git a/src/client/textanalysis.ui.js b/src/client/textanalysis.ui.js index 7fe2940f..2e16c7df 100644 --- a/src/client/textanalysis.ui.js +++ b/src/client/textanalysis.ui.js @@ -110,7 +110,7 @@ function changeType(arg) { } nodetype = (arg === 'up'? textanalysis.selected_type_next() : textanalysis.selected_type_prev()); - rz_core.edit_graph.editType(id, null, nodetype); + rz_core.edit_graph.editType(id, nodetype); typeselection.showChosenType(nodetype); rz_core.edit_graph.findCoordinates(id); textanalysis.set_type(name, nodetype); |
