//Contains functions to update, create and retrieve arrays. Also uses arrays to determine properties (lNode, rNode) of arrows var missingStarts = []; var missingEnds = []; //Stores module's properties in its array function storeXY (arrayType,id) { 'use strict'; var index; for ( i = 0; i' + '
'+ text +'
'+ '
'+ ''; dropOffLocation = document.getElementById("nodeChildrenDroppedOffHere"); dropOffLocation.innerHTML += tag; var index = nodeArr.push([document.getElementById(id),id,text,parseInt(lX),parseInt(lY),wide,parseInt(lX)+parseInt(wide),parseInt(lY)]); if (tosca_ID !==null){ document.getElementById(id).setAttribute('taska_id',tosca_ID); } if ( text !== null ){ document.getElementById(id).setAttribute('sname',text); } // When Role is added uncomment. console.log(role); if ( role !== null ){ document.getElementById(id).setAttribute('role_id',role); } if (isOverlapped(id) === true){ shiftRight(document.getElementById(id),160); } if (isOverlapped(id) === false){ for (i=0;i'+ '
'+text+'
'+ '
'+ ''; } if (direction === "left"){ tag = '
'+ '
'+ '
' + text + '
'+ '
'; } if (direction === "self"){ tag = '
'+ '
'+ '
' + text + '
'+ '
'; } dropOffLocation = document.getElementById("arrowChildrenDroppedOffHere"); dropOffLocation.innerHTML += tag; arrowArr.push([document.getElementById(id),id,text,parseInt(lX),lY,parseInt(wide),parseInt(lX)+parseInt(wide),parseInt(lY),"","",arrowDescription]); determineLRNode(id,"arrow"); } if (arrayType == "noteArr"){ tag = '
' + text + '
'; dropOffLocation = document.getElementById("noteChildrenDroppedOffHere"); dropOffLocation.innerHTML += tag; noteArr.push([document.getElementById(id),id,text,parseInt(lX),parseInt(lY),wide,parseInt(lX)+parseInt(wide),parseInt(lY)+parseInt(height)]); } } var layers = {}; var nodesInLayer = []; function determineLayers () { var doAgain = true; layers.length = 0; var layerNumber = -1; while (doAgain === true){ layerNumber++; nodesInLayer.length = 0; var classToAssign = 'layer'+layerNumber; for (var i=0; i