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) {