Commit e5157ea202af0aa1ad89214cf97ae997379cb20b

Authored by Nikita Kulshreshtha
2 parents 30312fb2 983f50b9

Merge branch 'MaaintainHighlihtOnViewChange1' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -5684,7 +5684,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5684,7 +5684,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5684 } 5684 }
5685 //if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender 5685 //if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender
5686 5686
5687 - if (($rootScope.isListManagerSelected == true) && ($rootScope.isGenderChnage == true)) { 5687 + if (($rootScope.isListManagerSelected == true) && (($rootScope.isGenderChnage == true) || $rootScope.isViewChange == true)) {
5688 5688
5689 $scope.setLayerNumberAndHighlightByTermList(); 5689 $scope.setLayerNumberAndHighlightByTermList();
5690 5690
@@ -5716,7 +5716,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -5716,7 +5716,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5716 5716
5717 //if listanager is visisble then close it 5717 //if listanager is visisble then close it
5718 5718
5719 - $rootScope.isListManagerSelected = false; 5719 + //$rootScope.isListManagerSelected = false;
5720 $rootScope.CloseListManager(); 5720 $rootScope.CloseListManager();
5721 5721
5722 5722
@@ -7426,100 +7426,103 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -7426,100 +7426,103 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7426 7426
7427 $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber); 7427 $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
7428 7428
7429 - var internalLayerNumberList = [];  
7430 - for (var i = 0; i < $scope.TermList.length; i++) {  
7431 - var layerNumber = $scope.TermList[i]._InternalLayerNumber 7429 + if (($scope.TermList != null || $scope.TermList != undefined) && $scope.TermList.length > 0) {
7432 7430
7433 - internalLayerNumberList[i] = parseInt(layerNumber);  
7434 - } 7431 + var internalLayerNumberList = [];
  7432 + for (var i = 0; i < $scope.TermList.length; i++) {
  7433 + var layerNumber = $scope.TermList[i]._InternalLayerNumber
7435 7434
7436 - internalLayerNumberList.sort(function (a, b) { return a - b })  
7437 - var internalLayerNumber = internalLayerNumberList[0]//.replace('00', ''); 7435 + internalLayerNumberList[i] = parseInt(layerNumber);
  7436 + }
7438 7437
7439 - //3. get layer number  
7440 - if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) { 7438 + internalLayerNumberList.sort(function (a, b) { return a - b })
  7439 + var internalLayerNumber = internalLayerNumberList[0]//.replace('00', '');
7441 7440
7442 - internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER;  
7443 - } 7441 + //3. get layer number
  7442 + if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) {
7444 7443
7445 - var layerNumber;  
7446 - var matchedLayerNumber = new jinqJs()  
7447 - .from($rootScope.BodyLayerData.Layers.DataLayer)  
7448 - .where("_lni == " + internalLayerNumber)  
7449 - .select('_LayerNumber'); 7444 + internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER;
  7445 + }
7450 7446
7451 - if (matchedLayerNumber == null || matchedLayerNumber.length == 0) {  
7452 - layerNumber = 0;  
7453 - }  
7454 - else {  
7455 - layerNumber = matchedLayerNumber[0]._LayerNumber  
7456 - } 7447 + var layerNumber;
  7448 + var matchedLayerNumber = new jinqJs()
  7449 + .from($rootScope.BodyLayerData.Layers.DataLayer)
  7450 + .where("_lni == " + internalLayerNumber)
  7451 + .select('_LayerNumber');
7457 7452
7458 - if (layerNumber == 0) {  
7459 - layerNumber = $rootScope.totalLayers;  
7460 - }  
7461 - else {  
7462 - layerNumber = parseInt(layerNumber) - 1;  
7463 - } 7453 + if (matchedLayerNumber == null || matchedLayerNumber.length == 0) {
  7454 + layerNumber = 0;
  7455 + }
  7456 + else {
  7457 + layerNumber = matchedLayerNumber[0]._LayerNumber
  7458 + }
  7459 +
  7460 + if (layerNumber == 0) {
  7461 + layerNumber = $rootScope.totalLayers;
  7462 + }
  7463 + else {
  7464 + layerNumber = parseInt(layerNumber) - 1;
  7465 + }
7464 7466
7465 - $scope.layerNumber = layerNumber; 7467 + $scope.layerNumber = layerNumber;
7466 7468
7467 - //4.get scroll position  
7468 - if ($rootScope.actualTermNumber != DA[0].SKIN_TERM_ID) { 7469 + //4.get scroll position
  7470 + if ($rootScope.actualTermNumber != DA[0].SKIN_TERM_ID) {
7469 7471
7470 - $scope.termCoordinate = $scope.getTermCoordinate($rootScope.actualTermNumber); 7472 + $scope.termCoordinate = $scope.getTermCoordinate($rootScope.actualTermNumber);
7471 7473
7472 - } 7474 + }
7473 7475
7474 - //5.  
7475 - $scope.matchdedDataOnLayer = new jinqJs()  
7476 - .from($rootScope.TermNumberData.TermData.Term)  
7477 - .where('_InternalLayerNumber == ' + internalLayerNumber)  
7478 - .select(); 7476 + //5.
  7477 + $scope.matchdedDataOnLayer = new jinqJs()
  7478 + .from($rootScope.TermNumberData.TermData.Term)
  7479 + .where('_InternalLayerNumber == ' + internalLayerNumber)
  7480 + .select();
7479 7481
7480 - if ($scope.matchdedDataOnLayer != null || $scope.matchdedDataOnLayer != undefined) { 7482 + if ($scope.matchdedDataOnLayer != null || $scope.matchdedDataOnLayer != undefined) {
7481 7483
7482 - //6.  
7483 - var matchedDataonActualTerm = new jinqJs()  
7484 - .from($scope.matchdedDataOnLayer)  
7485 - .where('_ActualTermNumber == ' + $scope.actualTermNumber)  
7486 - .select('_TermNumber'); 7484 + //6.
  7485 + var matchedDataonActualTerm = new jinqJs()
  7486 + .from($scope.matchdedDataOnLayer)
  7487 + .where('_ActualTermNumber == ' + $scope.actualTermNumber)
  7488 + .select('_TermNumber');
7487 7489
7488 - if (matchedDataonActualTerm != null || matchedDataonActualTerm != undefined) { 7490 + if (matchedDataonActualTerm != null || matchedDataonActualTerm != undefined) {
7489 7491
7490 - var termNo = matchedDataonActualTerm[0]._TermNumber.toString(); 7492 + var termNo = matchedDataonActualTerm[0]._TermNumber.toString();
7491 7493
7492 - //7.get termList  
7493 - $scope.fullTermlist = [];  
7494 - $scope.AllTerms = []; 7494 + //7.get termList
  7495 + $scope.fullTermlist = [];
  7496 + $scope.AllTerms = [];
7495 7497
7496 - if (termNo != DA[0].figLeafTermId) { 7498 + if (termNo != DA[0].figLeafTermId) {
7497 7499
7498 - $scope.getChildTermList(termNo);  
7499 - // $timeout(function () { $scope.getSiblings(termNo) }, 50);  
7500 - $scope.getSiblings(termNo)  
7501 - } 7500 + $scope.getChildTermList(termNo);
  7501 + // $timeout(function () { $scope.getSiblings(termNo) }, 50);
  7502 + $scope.getSiblings(termNo)
  7503 + }
7502 7504
  7505 + }
7503 } 7506 }
7504 } 7507 }
  7508 + $('#txtlayerNumber').val((parseInt($scope.layerNumber)));
  7509 + $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));
7505 7510
7506 - $('#txtlayerNumber').val((parseInt($scope.layerNumber)));  
7507 - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));  
7508 -  
7509 - //8.remove current layer canavses  
7510 - $scope.flushCanvas(); 7511 + //8.remove current layer canavses
  7512 + $scope.flushCanvas();
7511 7513
7512 7514
7513 7515
7514 - //9.  
7515 - $timeout(function () {  
7516 - $rootScope.isHighLight = false;  
7517 - $('#sppeachBubble').css('display', 'none');  
7518 - $("#dot").css("display", "none"); 7516 + //9.
  7517 + $timeout(function () {
  7518 + $rootScope.isHighLight = false;
  7519 + $('#sppeachBubble').css('display', 'none');
  7520 + $("#dot").css("display", "none");
7519 7521
7520 - //redraw body of respective layer  
7521 - $scope.CalculateImageCordinates($rootScope.viewOrientationId)  
7522 - }, 500); 7522 + //redraw body of respective layer
  7523 + $scope.CalculateImageCordinates($rootScope.viewOrientationId)
  7524 + }, 500);
  7525 +
7523 } 7526 }
7524 7527
7525 $scope.getChildTermList = function (termNo) { 7528 $scope.getChildTermList = function (termNo) {