Commit ad8770dd306ee9455b2861241e738692843edb01

Authored by Amrita Vishnoi
1 parent 2a2ce7c2

manual freeze fix merge and also removed addEventListner from close and create t…

…box function because they were creating functional issue and now we have added onClick for them.
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -1001,13 +1001,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1001 1001 $('#draggable').css('width', dragdivw);
1002 1002 $('#draggable').css('height', dragdivh)
1003 1003  
1004   - document.getElementById('btnTranparency').addEventListener('click', $scope.createTransparencyBox);
  1004 + // document.getElementById('btnTranparency').addEventListener('click', $scope.createTransparencyBox);
1005 1005 document.getElementById('btnNormalMode').addEventListener('click', $scope.enableNormalMode);
1006 1006 document.getElementById('btnExtract').addEventListener('click', $scope.enableExtract);
1007 1007 document.getElementById('btnHighLight').addEventListener('click', $scope.enableHighlight);
1008 1008 document.getElementById('btnIdentity').addEventListener('click', $scope.OnIdentityClick);
1009 1009 document.getElementById('btnZoom').addEventListener('click', $scope.enableZoom);
1010   - document.getElementById('btnTBoxClose').addEventListener('click', $scope.CloseTransparencyBox);
  1010 + //document.getElementById('btnTBoxClose').addEventListener('click', $scope.CloseTransparencyBox);
1011 1011  
1012 1012 }
1013 1013  
... ... @@ -3586,7 +3586,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3586 3586 $scope.TransparencyEndX = TransparencyEndX;
3587 3587 $scope.TransparencyBoxEndY = TransparencyBoxEndY;
3588 3588  
3589   -
  3589 + $scope.layerNumberBeforeTrans = parseInt($('#txtlayerNumber').val());
3590 3590  
3591 3591 //draw temp box to store the canvas data with original transparecy
3592 3592 if (document.getElementById('tempCanvas') != null) {
... ... @@ -3871,7 +3871,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3871 3871  
3872 3872 // alert('isMousUp on isLayerChanged');
3873 3873  
3874   - $scope.layerNumber = parseInt($('#txtlayerNumber').val());
  3874 + // $scope.layerNumber = parseInt($('#txtlayerNumber').val());
3875 3875  
3876 3876 }
3877 3877 else {
... ... @@ -3881,7 +3881,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3881 3881 //$scope.layerNumber = tranparencyLayer;
3882 3882  
3883 3883 var tranparencyLayer;
3884   - var currentLayer = parseInt($('#txtlayerNumber').val());
  3884 +
  3885 + var currentLayer = $scope.layerNumberBeforeTrans;
  3886 +
3885 3887 if (currentLayer == $rootScope.totalLayers) {
3886 3888  
3887 3889 tranparencyLayer = currentLayer;
... ... @@ -4573,7 +4575,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4573 4575  
4574 4576 $scope.CloseTransparencyBox = function () {
4575 4577  
4576   - alert('CloseTransparencyBox is called');
  4578 +
4577 4579 //To enable extract button
4578 4580 $rootScope.isTransparencyActivated = false;
4579 4581 $("#btnExtract").removeClass("disabled");
... ... @@ -7967,3 +7969,12 @@ function onTboxCreation()
7967 7969 scope.createTransparencyBox('true');
7968 7970 });
7969 7971 }
  7972 +
  7973 +function onTboxClose()
  7974 +{
  7975 + console.log('onTboxClose is called outside ');
  7976 + var scope = angular.element(document.getElementById("daView")).scope();
  7977 + scope.$apply(function () {
  7978 + scope.CloseTransparencyBox();
  7979 + });
  7980 +}
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -363,7 +363,7 @@
363 363 <div>
364 364 <div>
365 365 <div class="modal-header annotation-modal-header">
366   - <button id="btnTBoxClose" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  366 + <button id="btnTBoxClose" type="button" onclick="onTboxClose()" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
367 367 <h4>Transparency</h4>
368 368 </div>
369 369 <div>
... ...