This commit is contained in:
Garrett K 2021-01-25 21:42:57 +00:00
parent 4319ae4135
commit 59c03f25c3
2 changed files with 9 additions and 7 deletions

View File

@ -291,8 +291,10 @@ function crawlPathConnections(){
var pathConnections = {};
var connectorElementArray = $('#containerFullPath').find('.port');
// Sort ports by connectionPairId
$.each(connectorElementArray, function(index, element){
if($(element).data('connectionPairId') !== undefined) {
if($(element).data('connectionPairId') !== '') {
var connectionPairID = $(element).data('connectionPairId');
if(pathConnections[connectionPairID] === undefined) {
pathConnections[connectionPairID] = [];
@ -300,6 +302,8 @@ function crawlPathConnections(){
pathConnections[connectionPairID].push($(element));
}
});
// Store path connection data
$(document).data('pathConnections', pathConnections);
}

View File

@ -48,11 +48,8 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
$mediaCategoryTable[$row['value']] = $row;
}
// Create endpointA object
// If object is an endpoint
// Create endpoint objects
$endpointAObj = $qls->App->objectArray[$endpointAObjID];
// If object is an endpoint
$endpointBObj = $qls->App->objectArray[$endpointBObjID];
$endpointAObj['face'] = $endpointAObjFace;
@ -324,6 +321,7 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
findPaths2($qls, $maxResults, $maxDepth, $reachable, $endpointAObj, $endpointBObj, $finalPathArray, $previousPathType);
}
error_log('Debug (finalPathArray): '.json_encode($finalPathArray));
foreach($finalPathArray as $mediaType => &$pathData) {
foreach($pathData as &$path) {
$path['pathHTML'] = $qls->App->buildPathFull($path['pathArray'], null);
@ -377,13 +375,13 @@ function findPaths2(&$qls, &$maxResults, &$maxDepth, &$reachable, &$focus, &$end
array_push($workingArray, array(
'type' => 'object',
'data' => array(
'data' => array(array(
'id' => $focusID,
'face' => $focusFace,
'depth' => $focusDepth,
'port' => $focusPort,
'selected' => false
)
))
));
// If focus is endpointB, add it to finalPathArray