Commit 9d0d47d2 authored by Jérome Perrin's avatar Jérome Perrin

Revert "remove onDataChange now that we have an explicit save button"

This reverts commit e12608e8.
parent 91c917f7
...@@ -111,6 +111,11 @@ ...@@ -111,6 +111,11 @@
return 'DreamNode_' + n; return 'DreamNode_' + n;
} }
function onDataChange() {
//$.publish("Dream.Gui.onDataChange", g.private.getData());
return undefined;
}
function updateConnectionData(gadget, connection, remove, edge_data) { function updateConnectionData(gadget, connection, remove, edge_data) {
if (remove) { if (remove) {
delete gadget.props.edge_container[connection.id]; delete gadget.props.edge_container[connection.id];
...@@ -121,6 +126,7 @@ ...@@ -121,6 +126,7 @@
edge_data || {} edge_data || {}
]; ];
} }
onDataChange();
} }
// bind to connection/connectionDetached events, // bind to connection/connectionDetached events,
...@@ -196,6 +202,7 @@ ...@@ -196,6 +202,7 @@
} }
coordinates[node_id] = coordinate; coordinates[node_id] = coordinate;
gadget.props.preference_container.coordinates = coordinates; gadget.props.preference_container.coordinates = coordinates;
onDataChange();
return coordinate; return coordinate;
} }
...@@ -276,6 +283,7 @@ ...@@ -276,6 +283,7 @@
// }); // });
// split in 2 methods ? one for events one for manip // split in 2 methods ? one for events one for manip
onDataChange();
draggable(gadget); draggable(gadget);
} }
...@@ -364,6 +372,7 @@ ...@@ -364,6 +372,7 @@
// 1.1111; // 1.1111;
// setZoom(gadget, zoom_level); // setZoom(gadget, zoom_level);
// gadget.props.preference_container.zoom_level = zoom_level; // gadget.props.preference_container.zoom_level = zoom_level;
// onDataChange();
// redraw(gadget); // redraw(gadget);
// } // }
...@@ -372,6 +381,7 @@ ...@@ -372,6 +381,7 @@
// 0.9; // 0.9;
// setZoom(gadget, zoom_level); // setZoom(gadget, zoom_level);
// gadget.props.preference_container.zoom_level = zoom_level; // gadget.props.preference_container.zoom_level = zoom_level;
// onDataChange();
// redraw(gadget); // redraw(gadget);
// } // }
...@@ -389,6 +399,7 @@ ...@@ -389,6 +399,7 @@
delete gadget.props.edge_container[k]; delete gadget.props.edge_container[k];
} }
}); });
onDataChange();
} }
function updateElementData(gadget, node_id, data) { function updateElementData(gadget, node_id, data) {
...@@ -418,6 +429,7 @@ ...@@ -418,6 +429,7 @@
= gadget.props.preference_container.coordinates[node_id]; = gadget.props.preference_container.coordinates[node_id];
delete gadget.props.preference_container.coordinates[node_id]; delete gadget.props.preference_container.coordinates[node_id];
} }
onDataChange();
} }
// function clearAll(gadget) { // function clearAll(gadget) {
...@@ -465,10 +477,12 @@ ...@@ -465,10 +477,12 @@
// function setGeneralProperties(gadget, properties) { // function setGeneralProperties(gadget, properties) {
// gadget.props.general_container = properties; // gadget.props.general_container = properties;
// onDataChange();
// } // }
// function updateGeneralProperties(gadget, properties) { // function updateGeneralProperties(gadget, properties) {
// $.extend(gadget.props.general_container, properties); // $.extend(gadget.props.general_container, properties);
// onDataChange();
// } // }
function openNodeDialog(gadget, element, config_dict) { function openNodeDialog(gadget, element, config_dict) {
...@@ -628,6 +642,7 @@ ...@@ -628,6 +642,7 @@
box.css("left", absolute_position[0]); box.css("left", absolute_position[0]);
updateNodeStyle(gadget, element.element_id); updateNodeStyle(gadget, element.element_id);
draggable(gadget); draggable(gadget);
onDataChange();
} }
function waitForDragover(gadget) { function waitForDragover(gadget) {
......
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