diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 09e8887..f806eca 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -11,7 +11,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.imagePath = "";
$rootScope.BodyRegionData;
$rootScope.BodyRegionCordinatesData;
- $scope.isTransparencyActivated = false;
+ $rootScope.isTransparencyActivated = false;
$rootScope.BodyLayerData;
$rootScope.VocabTermData;
@@ -979,10 +979,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var canDiv = document.getElementById('canvasDiv');
var canDivChildCount = canDiv.childElementCount;
if (canDivChildCount > 0) {
- canDiv.innerHTML = '';
- //remove transparency scale
- $('#transparencyScale').css('visibility', 'hidden');
+ if ($rootScope.isTransparencyActivated) {
+ $scope.flushCanvas();
+ $('#transparencyScale').css('visibility', 'visible');
+ }
+ else {
+ canDiv.innerHTML = '';
+ //remove transparency scale
+ $('#transparencyScale').css('visibility', 'hidden');
+ }
+
}
if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) {
@@ -2536,7 +2543,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.HighlightBodyByTermList = function (TermList) {
$("#btnTranparency").attr('disabled', 'disabled');
- $scope.currentLayerNumber = $scope.layerNumber;
+ $rootScope.currentLayerNumber = $scope.layerNumber;
$scope.layerNumber = $('#txtlayerNumber').val();
@@ -2828,7 +2835,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
document.getElementById("daView").style.pointerEvents="none";
$('.ui-slider').slider('disable');
$("#btnTranparency").attr('disabled', 'disabled');
- $scope.currentLayerNumber = $scope.layerNumber;
+ $rootScope.currentLayerNumber = $scope.layerNumber;
$scope.layerNumber = $('#txtlayerNumber').val();
@@ -3310,7 +3317,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// $('#daLoaderLabel').css('visibility', 'visible');
- if ($scope.isTransparencyActivated) {
+ if ($rootScope.isTransparencyActivated) {
//crete temp canavs to store the original data which will be used to chnange the transparency
if (document.getElementById('tempCanvas') != null) {
@@ -3461,11 +3468,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) {
$('#txtlayerNumber').val(dataLength - 1);
- $scope.currentLayerNumber = parseInt(dataLength - 1);
+ $rootScope.currentLayerNumber = parseInt(dataLength - 1);
$scope.layerNumber = parseInt(dataLength - 1);
}
else
- $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val());
+ $rootScope.currentLayerNumber = parseInt($('#txtlayerNumber').val());
//$scope.isMousUp();
@@ -4311,9 +4318,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
//Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
- if ($("#txtlayerNumber").val() != 0 && $scope.currentLayerNumber != undefined) {
- $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.currentLayerNumber));
- $("#txtlayerNumber").val(parseInt($scope.currentLayerNumber));
+ if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) {
+ $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber));
+ $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber));
}
}
@@ -4358,7 +4365,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var previewRectangleHeight = $('.rectangle').height()
- $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val());
+ $rootScope.currentLayerNumber = parseInt($('#txtlayerNumber').val());
$('.rectangle').remove();
var currentMousePosition = $scope.getMousePos(e);
@@ -4406,7 +4413,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- $scope.isTransparencyActivated = true;
+ $rootScope.isTransparencyActivated = true;
var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
@@ -4582,7 +4589,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#btnTranparency').addClass('tButtonActive');
- // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1);
+ // $('#txtlayerNumber').val((parseInt($rootScope.currentLayerNumber)) + 1);
//Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
$('#btnTranparency').removeClass('tButtonActive');
$('#btnTranparency').addClass('btn-black');
@@ -6293,7 +6300,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// $rootScope.switchCanvas();
//To enable extract button
- $scope.isTransparencyActivated = false;
+ $rootScope.isTransparencyActivated = false;
$("#btnExtract").removeClass("disabled");
@@ -6339,12 +6346,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
- $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.currentLayerNumber));
+ $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber));
//if ($scope.isGenderChnage || $rootScope.isViewChange) {
// $("#txtlayerNumber").val(parseInt(0));
//}
//else
- $("#txtlayerNumber").val(parseInt($scope.currentLayerNumber));
+ $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber));
if (document.getElementById('tempCanvas') != null) {
@@ -6356,7 +6363,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//var scope = angular.element(document.getElementById("DAView")).scope();
//scope.$apply(function () {
// $scope.layerNumber = 0;
- // $scope.isTransparencyActivated = false;
+ // $rootScope.isTransparencyActivated = false;
//})
@@ -6369,7 +6376,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']"))
//.remove();
- $scope.layerNumber = $scope.currentLayerNumber;
+ $scope.layerNumber = $rootScope.currentLayerNumber;
$scope.transNumber = 100;
$(".slider").slider({ value: 100 })
}
@@ -6385,7 +6392,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#transparencyScale').css('visibility', 'hidden');
- //$scope.isTransparencyActivated = false;
+ //$rootScope.isTransparencyActivated = false;
// document.getElementById('btnTranparency').className = 't-transparency'
$('#btnTranparency').removeClass('tButtonActive');
$('#btnTranparency').addClass('btn-black');
@@ -6533,7 +6540,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.terminateCurrentlyRunningWPs();
- if ($scope.isTransparencyActivated) {
+ if ($rootScope.isTransparencyActivated) {
$scope.CloseTransparencyBox();
@@ -6758,8 +6765,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.enableNormalMode = function () {
$("#btnTranparency").removeClass("disabled");
- if ($scope.isTransparencyActivated) {
- $scope.layerNumber = $scope.currentLayerNumber;
+ if ($rootScope.isTransparencyActivated) {
+ $scope.layerNumber = $rootScope.currentLayerNumber;
}
else {
$scope.layerNumber = $('#txtlayerNumber').val();
@@ -6870,7 +6877,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
- if ($scope.isTransparencyActivated == true) {
+ if ($rootScope.isTransparencyActivated == true) {
$("#btnExtract").addClass("disabled");
@@ -7957,8 +7964,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.layerNumber = parseInt($('#txtlayerNumber').val());
//alert('mouseUp');
+ if ($rootScope.isTransparencyActivated && $rootScope.currentLayerNumber == 0) {
+ $scope.layerNumber = $rootScope.currentLayerNumber;
+ $scope.loadSelectedBodyView(data.reloadDABodyViewId);
- if ($scope.layerNumber == 0) {
+ }
+ else if ($scope.layerNumber == 0) {
$scope.loadSelectedBodyView(data.reloadDABodyViewId);
}
// $scope.loadSelectedBodyView(data.reloadDABodyViewId);