Commit 3beb71eb authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

clearAll should clear everything, including general properties and preferences.

parent 96a65d0b
......@@ -25,6 +25,15 @@
var that = jsonPlumb(),
priv = {};
that.initGeneralProperties = function () {
var general_properties = {};
$.each(configuration["Dream-Configuration"].property_list, function (
idx, element) {
general_properties[element.id] = element._default;
});
that.setGeneralProperties(general_properties);
};
priv.displayTool = function () {
var render_element = $("#tools-container");
for (var key in configuration) {
......@@ -221,13 +230,7 @@
priv.super_start();
priv.displayTool();
priv.initDialog();
// save general configuration default values
var general_properties = {};
$.each(configuration["Dream-Configuration"].property_list, function (
idx, element) {
general_properties[element.id] = element._default;
});
that.setGeneralProperties(general_properties);
that.initGeneralProperties();
that.prepareDialogForGeneralProperties();
};
......
......@@ -365,7 +365,13 @@
});
// delete anything if still remains
$("#main").children().remove();
priv.node_container = {};
priv.edge_container = {};
priv.preference_container = {};
priv.general_container = {};
priv.initSpreadSheet();
that.initGeneralProperties();
that.prepareDialogForGeneralProperties();
};
that.connect = function (source_id, target_id) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment