diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 039aee3..71e1098 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2427,7 +2427,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) { - + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.highlightedBR.length == 9)) { $scope.doAligneCanvasWithTerm = true; } @@ -2440,7 +2440,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else if ((($rootScope.viewOrientationId == '6')) && ($scope.highlightedBR.length == 1)) { $scope.doAligneCanvasWithTerm = true; } - if ($scope.doAligneCanvasWithTerm == true) { if ($rootScope.isListManagerSelected == true) @@ -6811,7 +6810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.searchFilter = event.currentTarget.innerHTML; //2. - $scope.HighlightBodyOnListManagerSelection(event); + $scope.HighlightBodyOnListManagerSelection(event.currentTarget.id); $scope.IsSearchVisible = false; $rootScope.isNormalMode = false; @@ -6983,7 +6982,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo for (var j = 0; j < $scope.VocabTermTxt.length; j++) { - var $el = $('').appendTo('#termList') + var $el = $('').appendTo('#termList') $compile($el)($scope); } @@ -7001,9 +7000,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - $scope.HighlightBodyOnListManagerSelection = function (event) { + $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber) { + + console.log('inside HighlightBodyOnListManagerSelection actualTermNumber= ' + actualTermNumber) // Terms search in the Search list should be disable in the List Manager and Vice-Versa. - if ($rootScope.prevId == event.currentTarget.id) { + if ($rootScope.prevId == actualTermNumber) { $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); @@ -7015,12 +7016,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#spinner').css('visibility', 'visible'); - $rootScope.prevId = event.currentTarget.id; + $rootScope.prevId = actualTermNumber; $("#termList").find("option").attr('selected', false); $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); - $("#termList").find("option[id=" + event.currentTarget.id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); + $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" }); - $("div#backdrop #termlistfilter li").find("a[id=" + event.currentTarget.id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); + $("div#backdrop #termlistfilter li").find("a[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); $scope.terminateCurrentlyRunningWPs(); //debugger $rootScope.isListManagerSelected = true; @@ -7041,7 +7042,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isHighlightBodyByBodySystem = false; //1. - $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; + $rootScope.actualTermNumber = actualTermNumber;//attributes[0].value; console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) //2. @@ -7237,11 +7238,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.aligneCanvasWithTerm = function () { console.log('aligneCanvasWithTerm') + // debugger + var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); - - var canvasX = parseInt($('#canvasDiv').css('left')); - var canvasY = parseInt($('#canvasDiv').css('top')); + + var canvasX = parseInt(document.getElementById('canvasDiv').offsetLeft); + var canvasY = parseInt(document.getElementById('canvasDiv').offsetTop); var canvasHeight = $('#canvasDiv').height(); var canvasWidth = $('#canvasDiv').width(); @@ -7269,7 +7272,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else { newX = maxHScrollPos; } - + //alert('newX= ' + newX + ',newY= ' + newY) $('#canvasDiv').scrollLeft(newX); $('#canvasDiv').scrollTop(newY); $scope.isLoading = false; @@ -7375,7 +7378,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo for (var j = 0; j < $scope.VocabTermTxt.length; j++) { - var $el = $('').appendTo('#termList') + var $el = $('').appendTo('#termList') $compile($el)($scope); } @@ -7622,4 +7625,13 @@ function OnZoom() scope.$apply(function () { scope.enableZoom(); }); +} + +function onListManagerTermSelection(id) { + + var scope = angular.element(document.getElementById("daView")).scope(); + scope.$apply(function () { + scope.HighlightBodyOnListManagerSelection(id); + }); + } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index b563c99..e1856a0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -735,7 +735,7 @@ - + @@ -746,7 +746,7 @@