From 18fab3c4352972d2e9fc45112811dca1ef534b7c Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 22 Sep 2016 18:14:29 +0530 Subject: [PATCH] after reverting flushCanavs to coloredImage src dependent, List manager stopped working. Reverted that code and apllied loop length as per view. Now LM is working. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 80 insertions(+), 26 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 818c02d..29c5978 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2262,7 +2262,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#spinner').css('visibility', 'hidden'); - //$rootScope.isHighlightBodyByBodySystem = false; + $rootScope.isHighlightBodyByBodySystem = false; if ($rootScope.isListManagerSelected == true) $scope.aligneCanvasWithTerm(); @@ -4750,30 +4750,88 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.flushCanvas = function () { - if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { - angular.forEach($scope.ColoredImageSRC, function (value, key) { + //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { + // angular.forEach($scope.ColoredImageSRC, function (value, key) { - var id; - var maskId; - if (value.haveMirror == 'true') { - id = 'imageCanvas' + value.bodyRegionId + '_MR'; - maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' - } - else { - id = 'imageCanvas' + value.bodyRegionId; - maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; - } + // var id; + // var maskId; + // if (value.haveMirror == 'true') { + // id = 'imageCanvas' + value.bodyRegionId + '_MR'; + // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' + // } + // else { + // id = 'imageCanvas' + value.bodyRegionId; + // maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; + // } - var canvas = document.getElementById(id); - if (canvas != null || canvas != undefined) { - document.getElementById('canvasDiv').removeChild(canvas); - } + // var canvas = document.getElementById(id); + // if (canvas != null || canvas != undefined) { + // document.getElementById('canvasDiv').removeChild(canvas); + // } - var maskcanvas = document.getElementById(maskId); - if (maskcanvas != null || maskcanvas != undefined) { - document.getElementById('canvasDiv').removeChild(maskcanvas); + // var maskcanvas = document.getElementById(maskId); + // if (maskcanvas != null || maskcanvas != undefined) { + // document.getElementById('canvasDiv').removeChild(maskcanvas); + + // } + // if (i == 4 || i == 5 || i == 6) { + // id = 'imageCanvas' + i + '_MR'; + // maskId = 'imageCanvas' + i + '_MR_mci'; + + // var canvas = document.getElementById(id); + // if (canvas != null || canvas != undefined) + // document.getElementById('canvasDiv').removeChild(canvas); + + // var maskcanvas = document.getElementById(maskId); + // if (maskcanvas != null || maskcanvas != undefined) + // document.getElementById('canvasDiv').removeChild(maskcanvas); + // } + + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); + // for (var i = 0; i < modestyCanvases.length; i++) { + // modestyCanvases[i].remove(); + // } + // }); + // //remove modesty canavs + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); + // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { + // for (var j = 0; j < modestyCanvases.length; j++) { + // modestyCanvases[j].remove(); + // } + // } + //} + var loopLength = 0; + if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) { + loopLength = 7; + } + else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')){ + loopLength = 5; + } + else if (($rootScope.viewOrientationId == '5')) { + loopLength = 4; + } + else if (($rootScope.viewOrientationId == '6')) { + loopLength = 1; + } + + for (var i = 1; i < loopLength; i++) { + + var id; + var maskId; + + id = 'imageCanvas' + i; + maskId = 'imageCanvas' + i + '_mci'; + + var canvas = document.getElementById(id); + if (canvas != null || canvas != undefined) + document.getElementById('canvasDiv').removeChild(canvas); + + var maskcanvas = document.getElementById(maskId); + if (maskcanvas != null || maskcanvas != undefined) + document.getElementById('canvasDiv').removeChild(maskcanvas); + + if (loopLength == 7) { - } if (i == 4 || i == 5 || i == 6) { id = 'imageCanvas' + i + '_MR'; maskId = 'imageCanvas' + i + '_MR_mci'; @@ -4786,12 +4844,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (maskcanvas != null || maskcanvas != undefined) document.getElementById('canvasDiv').removeChild(maskcanvas); } + } - var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); - for (var i = 0; i < modestyCanvases.length; i++) { - modestyCanvases[i].remove(); - } - }); //remove modesty canavs var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { -- libgit2 0.21.4