diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 4497775..8129e1a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -45,7 +45,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.doHighlightOrExtract = false; $scope.isEligibleForHighlightBodyByTermList = false; - // $scope.AnteriorView = "active"; + $scope.AnteriorView = "active"; $scope.zoomInOut = 75; $scope.speechBubbleCounter = 0; @@ -165,7 +165,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //get the DA body view list based on selected gender $scope.getDAViewList = function ($event) { - + // debugger; if ($('#MainImage') != null) { $('#MainImage').remove(); } @@ -244,7 +244,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; - + // debugger; var $el = $('
' + '' @@ -265,7 +265,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.openView = function ($event) { - + // debugger; $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -273,7 +273,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.ViewTitle = $event.currentTarget.textContent; localStorage.setItem("currentViewTitleFromJson", $event.currentTarget.textContent); - localStorage.setItem("currentViewTitle", $event.currentTarget.textContent); localStorage.setItem("currentBodyViewId", $event.currentTarget.id); var u = $location.url(); @@ -282,64 +281,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var view_list = angular.element($event.currentTarget); var view_list_male_female = view_list.attr('title'); - if (($event.currentTarget.textContent == "Female Anterior" || $event.currentTarget.textContent == "Male Anterior")) { - $rootScope.AnteriorView = "active"; - $rootScope.LateralView = ""; - $rootScope.MedialView = ""; - $rootScope.PosteriorView = ""; - $rootScope.LateralArmView = ""; - $rootScope.MedialArmView = ""; - } - if (($event.currentTarget.textContent == "Female Lateral" || $event.currentTarget.textContent == "Male Lateral")) { - $rootScope.AnteriorView = ""; - $rootScope.LateralView = "active"; - $rootScope.MedialView = ""; - $rootScope.PosteriorView = ""; - $rootScope.LateralArmView = ""; - $rootScope.MedialArmView = ""; - - - } - if (($event.currentTarget.textContent == "Female Medial" || $event.currentTarget.textContent == "Male Medial")) { - $rootScope.AnteriorView = ""; - $rootScope.LateralView = ""; - $rootScope.MedialView = "active"; - $rootScope.PosteriorView = ""; - $rootScope.LateralArmView = ""; - $rootScope.MedialArmView = ""; - - - } - if (($event.currentTarget.textContent == "Female Posterior" || $event.currentTarget.textContent == "Male Posterior")) { - $rootScope.AnteriorView = ""; - $rootScope.LateralView = ""; - $rootScope.MedialView = ""; - $rootScope.PosteriorView = "active"; - $rootScope.LateralArmView = ""; - $rootScope.MedialArmView = ""; - - } - if (($event.currentTarget.textContent == "Female Lateral Arm" || $event.currentTarget.textContent == "Male Lateral Arm")) { - $rootScope.AnteriorView = ""; - $rootScope.LateralView = ""; - $rootScope.MedialView = ""; - $rootScope.PosteriorView = ""; - $rootScope.LateralArmView = "active"; - $rootScope.MedialArmView = ""; - - - } - if (($event.currentTarget.textContent == "Female Medial Arm" || $event.currentTarget.textContent == "Male Medial Arm")) { - $rootScope.AnteriorView = ""; - $rootScope.LateralView = ""; - $rootScope.MedialView = ""; - $rootScope.PosteriorView = ""; - $rootScope.LateralArmView = ""; - $rootScope.MedialArmView = "active"; - - - } - //$rootScope.Normal = "LeftButtonsDefaultState"; if (view_list_male_female == "Male") { @@ -682,7 +623,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.LoadDefaultLayerImage = function () { - + // debugger; + $rootScope.isNormalMode = true; $scope.layerNumber = 0; @@ -943,19 +885,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; //set scrollbars on canvas and hide loading label - $('#daLoaderLabel').css('visibility', 'hidden') + // $('#daLoaderLabel').css('visibility', 'hidden') - - $('#canvasDiv').css('overflow', 'scroll') - if (isiOSSafari) { - $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) - - } - else { - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) - } - + $('#canvasDiv').css('overflow', 'scroll') + if (isiOSSafari) { + $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) + } + else { + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) + } // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) $('#canvasDiv').scrollTop(50) var abc = $rootScope.BodyRegionCordinatesData; @@ -996,8 +935,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }; } - - $('#draggable').css('width', dragdivw); $('#draggable').css('height', dragdivh) } @@ -1059,7 +996,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.GetImageSource = function (bodyRegionId) { - + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; //set max for LayerNumber input @@ -1077,7 +1014,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.userInput = parseInt($scope.layerNumber); - + $scope.skinTone = $rootScope.globalSetting.ethnicity; var SelectedLayerData = []; @@ -1139,7 +1076,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.GetBackgroundImgSource = function (bodyRegionId) { - + var selectedGender; if (localStorage.getItem("genderId") == "Male") { @@ -1157,7 +1094,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.bagartBodyRegionDetails != null || $scope.bagartBodyRegionDetails != undefined) { //filter bodyRegion data basd on skintone - $scope.skinTone = $rootScope.globalSetting.ethnicity + $scope.skinTone = $rootScope.globalSetting.ethnicity $scope.bagartDetailsOnSktn = new jinqJs() .from($scope.bagartBodyRegionDetails) .where('_Skintone == ' + $scope.skinTone) @@ -1452,9 +1389,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.isEligibleForHighlight = false; } - if ($scope.isEligibleForHighlight == true) - { - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { + if ($scope.isEligibleForHighlight == true) { + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { //$rootScope.isLoading = false; //$('#spinner').css('visibility', 'hidden'); @@ -1465,7 +1401,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$timeout(function () { console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; - console.log('in FlipedImgCanvas just before highLightBody call'); + console.log('just before highLightBody call'); $scope.highLightBody(); console.log('just after highLightBody call'); //}, 500); @@ -1773,9 +1709,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.isEligibleForHighlight = false; } - if ($scope.isEligibleForHighlight == true) - { - + if ($scope.isEligibleForHighlight == true) { if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { $rootScope.isLoading = false; @@ -1787,11 +1721,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$timeout(function () { console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; - console.log('just before highLightBody call'); - $scope.highLightBody(); - console.log('just after highLightBody call'); //}, 500); } @@ -1845,16 +1776,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.HighlightBodyOnExtract = function () { - + var multiTermList = []; var CallBackBodyRegion = []; if ($rootScope.isListManagerSelected) { - - multiTermList = $scope.AllTerms; - - } - else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { + + multiTermList = $scope.AllTerms; + + } + else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { angular.forEach($rootScope.previousHighlightList, function (value, key) { var ActualTermNo = $scope.getActualTermNumber(value); @@ -2268,7 +2199,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); - + // }; @@ -2415,11 +2346,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //layer change function $scope.LayerChange = function () { - - //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; - - $rootScope.CloseListManager(); + + //if listanager is visisble then close it + $rootScope.isListManagerSelected = false; + + $rootScope.CloseListManager(); @@ -2536,8 +2467,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.isHighlightBodyByBodySystem) { $timeout(function () { $scope.DisableProgressBar() }, 20000); } - else - { + else { $timeout(function () { $scope.DisableProgressBar() }, 2000); } } @@ -2693,87 +2623,77 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo + ''; + $('#canvasDiv').append(sppechBubbleDotHTML); - //Issue #7286 :Undefined annotation should not appear - for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { - var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; - } - - if (MultipleLanguage == undefined) { - console.log("No text is found"); - } else { - $('#canvasDiv').append(sppechBubbleDotHTML); - - if ($scope.MultiLanguageAnnationArray.length > 0) { - for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { - var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; - $("#sppeachBubble").append("

" + MultipleLanguage + "

"); - } + if ($scope.MultiLanguageAnnationArray.length > 0) { + for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { + var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; + $("#sppeachBubble").append("

" + MultipleLanguage + "

"); } - else { - console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) - } - if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { - if ($scope.longestAnnotation.length <= 10) { - + } + else { + console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) + } + if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { + if ($scope.longestAnnotation.length <= 10) { - $("#sppeachBubble").css("width", "100px"); - } + $("#sppeachBubble").css("width", "100px"); - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { + } + else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { - $("#sppeachBubble").css("width", "140px"); - } - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { + $("#sppeachBubble").css("width", "140px"); + } + else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { - $("#sppeachBubble").css("width", "195px"); - } - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { + $("#sppeachBubble").css("width", "195px"); - $("#sppeachBubble").css("width", "248px"); + } + else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { - } - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { + $("#sppeachBubble").css("width", "248px"); + } + else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { - $("#sppeachBubble").css("width", "300px"); - } - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { + $("#sppeachBubble").css("width", "300px"); + } - $("#sppeachBubble").css("width", "370px"); + else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { - } + $("#sppeachBubble").css("width", "370px"); - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { + } + else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { - $("#sppeachBubble").css("width", "450px"); - } + $("#sppeachBubble").css("width", "450px"); - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { + } + else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { - $("#sppeachBubble").css("width", "510px"); - } + $("#sppeachBubble").css("width", "510px"); - else { + } + else { - $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); + $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); - } } + } var Globe = []; Globe.push({ currentX: x, currentY: y }); @@ -3261,54 +3181,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { var sppechBubbleHTML = "
"; - //Issue #7286 :Undefined annotation should not appear + $("#canvasDiv").append(sppechBubbleHTML); + for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { var annotation = $scope.MultiLanguageAnnationArray[i]; - } - - if (annotation == undefined) { - console.log("No text found"); - } else { - $("#canvasDiv").append(sppechBubbleHTML); - - for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { - var annotation = $scope.MultiLanguageAnnationArray[i]; - - $("#" + id).append("

" + annotation + "

"); - } + $("#" + id).append("

" + annotation + "

"); + } - if ($scope.longestAnnotation.length <= 10) { - $("#" + id).css("width", "100px"); - } + if ($scope.longestAnnotation.length <= 10) { + $("#" + id).css("width", "100px"); + } - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { - $("#" + id).css("width", "140px"); - } - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { - $("#" + id).css("width", "195px"); + else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { + $("#" + id).css("width", "140px"); + } + else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { + $("#" + id).css("width", "195px"); - } - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { - $("#" + id).css("width", "248px"); - } - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { - $("#" + id).css("width", "300px"); - } + } + else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { + $("#" + id).css("width", "248px"); + } + else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { + $("#" + id).css("width", "300px"); + } - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { - $("#" + id).css("width", "370px"); - } - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { - $("#" + id).css("width", "450px"); - } - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { - $("#" + id).css("width", "510px"); + else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { + $("#" + id).css("width", "370px"); + } + else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { + $("#" + id).css("width", "450px"); + } + else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { + $("#" + id).css("width", "510px"); - } - else { - $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); - } + } + else { + $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); } } @@ -3407,9 +3317,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - - $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + + $rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); $scope.isTransparencyActivated = true; @@ -3652,7 +3562,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#btnTranparency').addClass('tButtonActive'); //debugger; - // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); + // $('#txtlayerNumber').val((parseInt($scope.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'); @@ -3831,7 +3741,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.layerNumber = tranparencyLayer; } - + $('#txtlayerNumber').val($scope.layerNumber); //dedebugger; //1. get the image source @@ -4618,7 +4528,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - + $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); // $('#btnIdentity').addClass('btn-primary'); @@ -4661,7 +4571,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isZoomed = true; //1. - + $scope.flushCanvas(); if ($scope.zoomInOut == 25) { @@ -4807,12 +4717,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.enableHighlight = function () { - + //if listanager is visisble then close it - // $rootScope.isListManagerSelected = false; + // $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); if ($rootScope.isHighLight == true) { @@ -4869,15 +4779,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.enableNormalMode = function () { - - console.log('enableNormalMode is called'); - - // $rootScope.isHighLight = false; - //to do should not call every time - $rootScope.CloseListManager(); - + //if listanager is visisble then close it + + // $rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); if ($rootScope.isNormalMode == true) { @@ -4900,9 +4807,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isZoomed = false; //6. - $rootScope.isListManagerSelected = false; - - //7. $scope.CalculateImageCordinates($rootScope.viewOrientationId); @@ -4937,7 +4841,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //if listanager is visisble then close it - // $rootScope.isListManagerSelected = false; + // $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); //1. $rootScope.isLoading = true; @@ -5182,7 +5086,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#spinner').css('visibility', 'hidden'); //} - + if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { @@ -5225,8 +5129,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else if ($rootScope.isListManagerSelected == true) { console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); - + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); + } } //else { @@ -5387,8 +5291,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else if ($rootScope.isListManagerSelected == true) { console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); - - } + + } } } @@ -5469,9 +5373,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.OnGenderChange = function (event) { //if listanager is visisble then close it - - //$rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + + //$rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -5935,8 +5839,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.Object1Index = 0; $rootScope.Object2Index = 0; $rootScope.resetText = 0; - $rootScope.resetTextSave = 0; - $rootScope.ObjectIndexSave = 0; + var arrayRect = {}; @@ -6065,10 +5968,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo resizeFromCenter: false, - dblclick: function () { - $rootScope.backOpacity(); - - }, click: function (layer) { $rootScope.canvasLayerNameCollection = []; @@ -6145,7 +6044,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo click: function (layer) { - // alert(layer.name); $rootScope.canvasLayerNameCollection = []; $rootScope.canvasLayerNameCollection.push(layer.name); $('#canvas').setLayer(layer.name, { @@ -6161,7 +6059,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }, mouseout: function (layer) { $rootScope.canvasLayerNameCollection = []; - $('#canvas').setLayer(layer.name, { handle: { type: 'arc', @@ -6288,7 +6185,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo x2: $scope.x, y2: $scope.y, click: function (layer) { - + // debugger; $rootScope.shapeTypePin = "Pin"; $rootScope.canvasLayerNameCollection = []; var pinLine_layer = layer.name; @@ -6312,7 +6209,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }, mouseout: function (layer) { - + // $rootScope.resetPinArc = ""; + // ax = ""; + $rootScope.canvasLayerNameCollection = []; $('#canvas').setLayer(layer.name, { handle: { @@ -6375,8 +6274,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('.btnCursor').addClass('activebtncolor'); break; case "TextArea": - $rootScope.IsTextAlreadySave = false; - $("#text_area").val(''); + // Draw text $rootScope.resetTextRect = $rootScope.ObjectIndex++; $rootScope.resetText = $rootScope.ObjectIndex++; @@ -6394,7 +6292,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo align: "left", fontFamily: 'Verdana, sans-serif', text: '' - + + + }) // Draw rect as wide as the text .drawRect({ @@ -6458,8 +6358,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $("#annotationTextModal").modal("toggle"); $('.btnCursor').trigger('click'); - $("#text_area").val(''); - $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); $(".btn-annotation").removeClass("activebtncolor"); $('.btnCursor').addClass('activebtncolor'); break; @@ -6483,275 +6381,129 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.underlineText; $rootScope.textArea; $rootScope.fontFamily; - $rootScope.TextPropertyArray = []; - $rootScope.modifySavedText = []; - $rootScope.TextRectangleArr = []; - $rootScope.rectDimension = []; - + $rootScope.saveText = function () { - // will refactor this code later + $rootScope.fontSizes = $("#text_area").css("font-size"); + $rootScope.fontWeight = $("#text_area").css("font-weight"); + $rootScope.fontStyle = $("#text_area").css("font-style"); + $rootScope.textAlignmt = $("#text_area").css("text-align"); + $rootScope.fontColor = $("#text_area").css("color"); + $rootScope.fontFamily = $("#text_area").css("font-family"); + $rootScope.underlineText = $("#text_area").css("text-decoration"); + $rootScope.textArea = $("#text_area").val(); + $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); + $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); + + $('#canvas').drawText({ + layer: true, + draggable: true, + name: 'TextArea_' + $rootScope.resetText, + groups: ['TextArea_' + $rootScope.resetText], + dragGroups: ['TextArea_' + $rootScope.resetText], + fillStyle: $rootScope.fontColor, + fontStyle: $rootScope.fontStyle, + fontSize: $rootScope.fontSizes, + fontFamily: $rootScope.fontFamily, + align: $rootScope.textAlignmt, + strokeWidth: 0, + text: $rootScope.textArea, + x: $scope.offsetX1, y: $scope.offsetY1, + maxWidth: $scope.x - $scope.offsetX1, + maxHeight: $scope.y - $scope.offsetY1, + + + click: function (layer) { + + + + }, + change: function (layer, props) { + + } + + }) + // Draw rect as wide as the text + .drawRect({ + name: 'TextArea1_' + $rootScope.resetText, + layer: true, + draggable: true, + groups: ['TextArea_' + $rootScope.resetText], + dragGroups: ['TextArea_' + $rootScope.resetText], + opacity: $rootScope.shapestyleOpacity, + // strokeStyle: 'black', + // strokeWidth: 2, + strokeStyle: $rootScope.shapestyleborderColor, + strokeWidth: $rootScope.shapestyleborderWidth, + // fillStyle: $rootScope.shapestyleFillColor, + x: $scope.offsetX1, y: $scope.offsetY1, + width: $scope.x - $scope.offsetX1, + height: $scope.y - $scope.offsetY1, + + click: function (layer) { + $rootScope.shapeTypeText = "textAreaRect"; + + var layerNameSplit = layer.name; + + var splitedName = layerNameSplit.split("_"); + + var textValName = "TextArea_"; + + var concatinateResult = textValName.concat(splitedName[1]); + + $rootScope.canvasLayerNameCollection = []; + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); + + + + $('#canvas').setLayer(layer.name, { + handle: { + type: 'rectangle', + fillStyle: '#fff', + strokeStyle: '#c33', + strokeWidth: 2, + width: 5, height: 5, + cornerRadius: 3 + } + }).drawLayers(); + + }, + mouseout: function (layer) { + + $rootScope.canvasLayerNameCollection = []; + $('#canvas').setLayer(layer.name, { + handle: { + type: 'rectangle', + fillStyle: 'pink', + strokeStyle: 'yellow', + strokeWidth: 0, + width: 0, height: 0, + cornerRadius: 0 + } + + }).drawLayers(); + + }, + mouseover: function (layer) { + + $('#canvas').setLayer(layer.name, { + handle: { + type: 'rectangle', + fillStyle: '#fff', + strokeStyle: '#c33', + strokeWidth: 2, + width: 5, height: 5, + cornerRadius: 3 + } + }).drawLayers(); + + } + }); + $("#text_area").val(''); + + $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); - - $rootScope.saveText = function () { - // this part will work first time when save button will be clicked - if ($rootScope.IsTextAlreadySave == false) { - // getting textarea style properties - $rootScope.fontSizes = $("#text_area").css("font-size"); - $rootScope.fontWeight = $("#text_area").css("font-weight"); - $rootScope.fontStyle = $("#text_area").css("font-style"); - $rootScope.textAlignmt = $("#text_area").css("text-align"); - $rootScope.fontColor = $("#text_area").css("color"); - $rootScope.fontFamily = $("#text_area").css("font-family"); - $rootScope.underlineText = $("#text_area").css("text-decoration"); - $rootScope.textArea = $("#text_area").val(); - - // deleting previous text area - - $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); - $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); - - // Text After Saving in Rectangle - $('#canvas').drawText({ - layer: true, - draggable: true, - name: 'TextArea_' + $rootScope.resetText, - groups: ['TextArea_' + $rootScope.resetText], - dragGroups: ['TextArea_' + $rootScope.resetText], - fillStyle: $rootScope.fontColor, - fontStyle: $rootScope.fontStyle, - fontSize: $rootScope.fontSizes, - fontFamily: $rootScope.fontFamily, - align: $rootScope.textAlignmt, - strokeWidth: 0, - text: $rootScope.textArea, - x: $scope.offsetX1, y: $scope.offsetY1, - maxWidth: $scope.x - $scope.offsetX1, - maxHeight: $scope.y - $scope.offsetY1, - add: function (layer) { - $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' }); - $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily }); - } - }) - // Draw rectangle - .drawRect({ - name: 'TextArea1_' + $rootScope.resetText, - layer: true, - draggable: true, - groups: ['TextArea_' + $rootScope.resetText], - dragGroups: ['TextArea_' + $rootScope.resetText], - opacity: $rootScope.shapestyleOpacity, - strokeStyle: $rootScope.shapestyleborderColor, - strokeWidth: $rootScope.shapestyleborderWidth, - x: $scope.offsetX1, y: $scope.offsetY1, - width: $scope.x - $scope.offsetX1, - height: $scope.y - $scope.offsetY1, - click: function (layer) { - $rootScope.shapeTypeText = "textAreaRect"; - - var layerNameSplit = layer.name; - var splitedName = layerNameSplit.split("_"); - var textValName = "TextArea_"; - var concatinateResult = textValName.concat(splitedName[1]); - $rootScope.canvasLayerNameCollection = []; - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); - $('#canvas').setLayer(layer.name, { - handle: { - type: 'rectangle', - fillStyle: '#fff', - strokeStyle: '#c33', - strokeWidth: 2, - width: 5, height: 5, - cornerRadius: 3 - } - }).drawLayers(); - }, - dblclick: function (layer) { - $rootScope.IsTextAlreadySave = true; - - var _rectLayerOnSave = layer.name; - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); - var TextAreaRectName = "TextArea_"; - var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]); - $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated }); - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); - var _rectLayerOnSaveSplitInt; - if (_rectLayerOnSaveSplit[1] >= 3) - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2); - else - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); - var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1; - $("#text_area").val(b); - $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize); - $("#text_area").css("font-weight", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); - $("#text_area").css("font-style", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); - $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align); - $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor); - $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily); - $("#text_area").css("text-decoration", $rootScope.underlineText); - _rectLayerOnSaveSplitInt = ''; b = ''; - $("#annotationTextModal").modal("toggle"); - }, - mouseout: function (layer) { - $rootScope.canvasLayerNameCollection = []; - $('#canvas').setLayer(layer.name, { - handle: { - type: 'rectangle', - fillStyle: 'pink', - strokeStyle: 'yellow', - strokeWidth: 0, - width: 0, height: 0, - cornerRadius: 0 - } - }).drawLayers(); - }, - mouseover: function (layer) { - $('#canvas').setLayer(layer.name, { - handle: { - type: 'rectangle', - fillStyle: '#fff', - strokeStyle: '#c33', - strokeWidth: 2, - width: 5, height: 5, - cornerRadius: 3 - } - }).drawLayers(); - - } - }); - $("#text_area").val(''); - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); - - } - -// this part will work second time when save button will be clicked - else { - // getting textarea style properties - var _modifiedText = $("#text_area").val(); - var _modifiedFontSize = $("#text_area").css("font-size"); - var _modifiedFontWeight = $("#text_area").css("font-weight"); - var _modifiedFontStyle = $("#text_area").css("font-style"); - var _modifiedTextAlign = $("#text_area").css("text-align"); - var _modifiedFontColor = $("#text_area").css("color"); - var _modifiedFontFamily = $("#text_area").css("font-family"); - var _modifiedFontDecoration = $("#text_area").css("text-decoration"); - - // deleting previous textarea - $("#canvas").removeLayer($rootScope.modifySavedText[0].RectText).drawLayers(); - $("#canvas").removeLayer($rootScope.modifySavedText[0].TextName).drawLayers(); - $rootScope.resetTextRectSave = $rootScope.ObjectIndexSave++; - $rootScope.resetTextSave = $rootScope.ObjectIndexSave++; - - // generating new text area - $('#canvas').drawText({ - layer: true, - draggable: true, - name: 'TextAreaAfterEdit_' + $rootScope.resetTextSave, - groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], - dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], - fillStyle: _modifiedFontColor, - fontStyle: _modifiedFontStyle, - fontSize: _modifiedFontSize, - fontFamily: _modifiedFontFamily, - align: _modifiedTextAlign, - strokeWidth: 0, - text: _modifiedText, - x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, - maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, - maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height - - }) - // Draw rect as wide as the text - .drawRect({ - name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave, - layer: true, - draggable: true, - groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], - dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], - opacity: $rootScope.shapestyleOpacity, - strokeStyle: $rootScope.shapestyleborderColor, - strokeWidth: $rootScope.shapestyleborderWidth, - x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, - width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, - height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, - click: function (layer) { - $rootScope.shapeTypeText = "textAreaRect"; - var layerNameSplit = layer.name; - var splitedName = layerNameSplit.split("_"); - var textValName = "TextAreaAfterEdit_"; - var concatinateResult = textValName.concat(splitedName[1]); - $rootScope.canvasLayerNameCollection = []; - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); - - $('#canvas').setLayer(layer.name, { - handle: { - type: 'rectangle', - fillStyle: '#fff', - strokeStyle: '#c33', - strokeWidth: 2, - width: 5, height: 5, - cornerRadius: 3 - } - }).drawLayers(); - - }, - dblclick: function (layer) { - - $rootScope.IsTextAlreadySave = true; - var _rectLayerOnSave = layer.name; - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); - var RectNameAfterEdit = "TextAreaAfterEdit_"; - var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]); - $rootScope.modifySavedText.push({ TextName: layer.name, RectText: RectNameAfterEditResult }); - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); - $("#text_area").val(_modifiedText); - $("#text_area").css("font-size", _modifiedFontSize); - $("#text_area").css("font-weight", _modifiedFontWeight); - $("#text_area").css("font-style", _modifiedFontStyle); - $("#text_area").css("text-align", _modifiedTextAlign); - $("#text_area").css("color", _modifiedFontColor); - $("#text_area").css("font-family", _modifiedFontFamily); - $("#text_area").css("text-decoration", _modifiedFontDecoration); - $("#annotationTextModal").modal("toggle"); - }, - mouseout: function (layer) { - $rootScope.canvasLayerNameCollection = []; - $('#canvas').setLayer(layer.name, { - handle: { - type: 'rectangle', - fillStyle: 'pink', - strokeStyle: 'yellow', - strokeWidth: 0, - width: 0, height: 0, - cornerRadius: 0 - } - }).drawLayers(); - }, - mouseover: function (layer) { - $('#canvas').setLayer(layer.name, { - handle: { - type: 'rectangle', - fillStyle: '#fff', - strokeStyle: '#c33', - strokeWidth: 2, - width: 5, height: 5, - cornerRadius: 3 - } - }).drawLayers(); - - } - }); - $rootScope.modifySavedText = []; - - } } - - // deleting text area on close button - $rootScope.closeModal = function () { - $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); - $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); - - } function OnPaintCanvasMouseMove(event) { @@ -6760,7 +6512,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $rootScope.FreeStylePaint = function (e) { - + // debugger; + + + // $rootScope.shapeType = "FreeStylePaint"; + canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); + canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); + } $scope.OnPaintBrushCanvasMouseDown = function (event) { @@ -6768,22 +6526,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo case "FreeStylePaint": - - - // $('#canvasPaint').sketch(); - // $('#canvasPaint').sketch({ defaultSize: 1 }); - // if ($("#amount-2").val() == '') { - // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); - // $('#canvasPaint').sketch(); - // } - // else { + debugger; + $('#canvasPaint').sketch({ defaultSize: 1 }); + //if ($("#amount-2").val() == '') { + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); + //} + //else { - // // var a = $("#amount-2").val(); - //// $scope.shapesize = parseInt(a); - // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); - // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); + // var a = $("#amount-2").val(); + // $scope.shapesize = parseInt(a); + // // alert(JSON.stringify({ defaultSize: $scope.shapesize })); + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); - // } + //} break; @@ -6801,7 +6556,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // case "FreeStylePaint": - + // debugger; + // if ($("#amount-2").val() == '') // { // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); @@ -6829,7 +6585,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (event.which == 46) { - + //debugger; if ($rootScope.shapeTypePin == "Pin") { @@ -7162,16 +6918,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.jumpToTerm = function (event) { - - - //1. $scope.searchFilter = event.currentTarget.innerHTML; - - //2. $scope.HighlightBodyOnListManagerSelection(event); $scope.IsSearchVisible = false; - $rootScope.isNormalMode = false; //Highlight only Highlight button @@ -7219,7 +6969,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //list manager $scope.$on('listManagerEvent', function (event, data) { - + // debugger; $('#spinner').css('visibility', 'visible'); console.log('listManagerEvent') if ($rootScope.islistManagerEventAlredayDispachted == true) { @@ -7239,7 +6989,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $compile($elem)($scope); }) - + $('#viewName').empty(); var currentView = localStorage.getItem("currentViewTitle"); var viewNmeHtml = '' @@ -7319,23 +7069,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - } + } $scope.HighlightBodyOnListManagerSelection = function (event) { $scope.terminateCurrentlyRunningWPs(); - + //debugger $rootScope.isListManagerSelected = true; - - $rootScope.setScrollBasedOnSearch = true; - $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); //1. - $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; - console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) + $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; + console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) //2. @@ -7520,8 +7267,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var canvasX = parseInt($('#canvasDiv').css('left')); var canvasY = parseInt($('#canvasDiv').css('top')); //var canvasWidth = parseInt($('#canvasDiv').css('width')); - // var canvasHeight = parseInt($('#canvasDiv').css('height')); - + // var canvasHeight = parseInt($('#canvasDiv').css('height')); + var canvasHeight = $('#canvasDiv').height(); var canvasWidth = $('#canvasDiv').width(); @@ -7529,11 +7276,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var canvasBottom = canvasY + canvasHeight; var canvasRight = canvasX + canvasWidth - if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom){ - //if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) { - - //} - //else { + if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom) { + //if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) { + + //} + //else { @@ -7568,7 +7315,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('newX =' + newX + ',newY= ' + newY) - + $scope.isLoading = false; $('#spinner').css('visibility', 'hidden'); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 13dfce4..3e18ad3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -72,11 +72,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", if (alreadyOpenThisView != null) { for (var i = 0; i < $rootScope.openViews.length; i++) { k++; -<<<<<<< HEAD if ($rootScope.openViews[i].bodyView == title) { -======= - if ($rootScope.openViews[i].body - views == title) { ->>>>>>> 27d0ad0c6a406c5ac1911e4eafe4ab2d1a009416 $rootScope.openViews.splice((k - 1), 1); $rootScope.openViews.push( @@ -134,30 +130,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.OnIdentifyClick = function () { - // $rootScope.isIdetifyClicked = true; - // $rootScope.isDrawingToolSelected = false; - $("#canvasPaint").css("display", "none"); - $("#canvas").css("display", "none"); - - // $("#canvasPaint").css("z-index", "0"); - // $("#canvas").css("z-index", "0"); - $('.btnCursor').removeClass('activebtncolor'); - + $rootScope.isIdetifyClicked = true; + $rootScope.isDrawingToolSelected = false; } - - - $rootScope.DrawingMode = function () { - - $('.btnCursor').addClass('activebtncolor'); - $rootScope.switchCanvas(); - $("#canvasPaint").css("display", "block"); - $("#canvas").css("display", "block"); - - } - - - //----Annotation Toolbar: Jcanvas----- $rootScope.DrawLine = function (e) { @@ -199,24 +175,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $(".btn-annotation-rectangle").addClass("activebtncolor"); } $rootScope.paintBrush = function () { - // debugger; - // $('.btnCursor').addClass('activebtncolor'); - $rootScope.switchCanvasToPaintCanvas(); - $rootScope.shapeType = "FreeStylePaint"; - var a = $("#amount-2").val(); - $rootScope.shapeSize = parseInt(a); - if ($rootScope.shapeSize == '') { - $('#canvasPaint').sketch({ defaultSize: 1 }); - } - else { - $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); - - } - - - // $('#canvasPaint').sketch(); + $('.btnCursor').addClass('activebtncolor'); + $rootScope.switchCanvasToPaintCanvas(); + $rootScope.shapeType = "FreeStylePaint"; + //alert($rootScope.shapeType); } @@ -255,8 +219,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-Text").addClass("activebtncolor"); - // $("#text_area").val(''); - // $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); + } $rootScope.DrawPolygon = function () { @@ -312,14 +275,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyleborderWidth = intPart[0]; $rootScope.shapestyleborderStyles = "solid"; - $('#editshapestyle').modal('hide'); - // name: 'Circle_' + $rootScope.resetCircle, - - - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); - - } $rootScope.enableAnnotationToolBar = function () {