Skip to content
Snippets Groups Projects
Commit 38a6e83a authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

refactor tree

parent 92d33922
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,9 @@ if (filter)
}
}
var originalObjectId = vars.get("$param.ObjectId_param");
_loadObjectRelationTree(originalObjectId, vars.get("$param.ObjectType_param"), selectedRelationType);
result.object(tree);
function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, pNodeId, pLayer, pRelationTypeData)
......@@ -86,7 +88,6 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId,
if (!pRelationTypeData)
pRelationTypeData = pNodeId[2];
var typeId = pRelationTypeData[0];
var hierarchy = pRelationTypeData[4];
var destObjectType = pRelationTypeData[6];
var relationType1 = pRelationTypeData[7];
......@@ -140,7 +141,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId,
* @param {String} pRelationType1
* @param {String} pRelationType2
* @param {String} pPrevId Id of the previous node to exclude it
* @param {String} pNoRecursion if false: select for direction "same" the other direction, if result is empty.
* @param {Boolean} [pNoRecursion=false] if false: select for direction "same" the other direction, if result is empty.
*
* @return {[][]}
*/
......@@ -201,6 +202,18 @@ function _getRelationTypes(pObjectType)
return ObjectRelationUtils.getPossibleRelationTypes(pObjectType, true);
}
/**
* insert a new Entry
*
* @param {Array} pTree
* @param {Array[][]} pEntryData
* @param {Array[][]} pNodeId id of the parent
* @param {Integer} pLayer layernumber
* @param {String} pObjectType
* @param {Integer} [pNum=undefined] optional number added to the key. Needed, if the key would not be unique.
*
* @return {Array[][]} the uids of the inserted data. Consists of [ObjectId, pEntryData-Index, ""(not needed anymore), pObjectType, pNodeId, objectrelationid, objecttype
*/
function _insertEntry(pTree, pEntryData, pNodeId, pLayer, pObjectType, pNum)
{
var expanded = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment