Commit 96ca3aa3 authored by Fintan Mc Gee's avatar Fintan Mc Gee

added grpah layering node type defnitino to the server side in bulk node update calls

parent 5e247363
......@@ -526,8 +526,10 @@ var updateNodeData_cb = function (req, res) {
sLog.debug_log("***********updatePositions" + JSON.stringify(req.body) + "\n\n");
sLog.debug_log("***********graphDB.userGraphs" + JSON.stringify(graphDB.userGraphs) + "\n\n");
var updatedNodeCount = graphObj.userGraphs[req.user.username].getLayerByName(req.body.nodeLayerName).setNodeProperty(req.body.nodeUid,req.body.nodePropName,req.body.nodePropValue);
res.json({msg:"Updated node properety completed"});
req.body.nodeUids.forEach(function(nUid) {
graphObj.userGraphs[req.user.username].getLayerByName(req.body.nodeLayerName).setNodeProperty(nUid,req.body.nodePropName, req.body.nodePropValue);
});
res.json({msg:"Updated node property completed"});
};
/**************************************
......
......@@ -879,9 +879,11 @@ angular.module('blizaarModule.services')
* Created By : Fintan McGee (LIST)
* Date: 03/03/2016
*******************************/
updateNodeDataToServer : function(nodeLayerName,nodeUid,nodePropName,nodePropValue) {
updateNodeDataToServer : function(nodeLayerName,nodeUids,nodePropName,nodePropValue) {
if(!Array.isArray(nodeUids)) {
nodeUids = [nodeUids];
}
// sending position map to server
return $http({
method: 'post',
......@@ -889,7 +891,7 @@ angular.module('blizaarModule.services')
headers: { 'Content-Type': 'application/json' }, // set the headers so angular passing info as form data (not request payload)
data: { graphName: self.currentGraphName,
nodeLayerName:nodeLayerName,
nodeUid: nodeUid,
nodeUids: nodeUids,
nodePropName:nodePropName,
nodePropValue: nodePropValue
}
......
This diff is collapsed.
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