From f7ff8bc38410c2666665c4c70cc71c17f6eb7835 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 23 Dec 2014 21:53:46 +0200 Subject: use topo_diff for user input changes pretty large commit, but it mainly boils to - reusing the same format clone returns to the client for topo_diff bad bad code introduced mainly in client side, but server wasn't spared: - graph/commit_topo__diff massages the links too much - this should not be there at all, it should be in the correct format to begin with. server code duplication between clone & topo_diff post processing, should be factored out on the good side: single transaction whenever user presses enter, and the correct place to send back any accumulated diffs (other user changes). --- src/client/textanalysis.ui.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/client/textanalysis.ui.js') diff --git a/src/client/textanalysis.ui.js b/src/client/textanalysis.ui.js index 5f5718bd..52b886be 100644 --- a/src/client/textanalysis.ui.js +++ b/src/client/textanalysis.ui.js @@ -1,7 +1,7 @@ "use strict" -define(['jquery', 'Bacon', 'consts', 'rz_bus', 'rz_core', 'textanalysis', 'view/completer'], -function($, Bacon, consts, rz_bus, rz_core, textanalysis, completer) { +define(['jquery', 'Bacon', 'consts', 'rz_bus', 'rz_core', 'rz_config', 'textanalysis', 'view/completer'], +function($, Bacon, consts, rz_bus, rz_core, rz_config, textanalysis, completer) { var text = "", // Last text of sentence element_name = '#textanalyser', @@ -65,8 +65,7 @@ function analyzeSentence(sentence, finalize) break; } - var backend_commit = false; - ret.applyToGraph(rz_core.graph, backend_commit); + ret.applyToGraph(rz_core.graph, rz_config.backend_enabled); if (finalize || sentence.length == 0) { typeselection.hide(); -- cgit v1.3.1