diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index c37c973..debf933 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -459,29 +459,34 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.setPropertiesForShapes = function (id) { - document.getElementById('modelbackground').style.display = "none"; - document.getElementById('modeleditstyle').style.display = "none"; + + if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { + // $('#btnShapeStyle').attr('disabled', 'disabled'); + } else { + //$('#btnShapeStyle').removeAttr('disabled', 'disabled'); + document.getElementById('modelbackground').style.display = "none"; + document.getElementById('modeleditstyle').style.display = "none"; - $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); - $("#shapeStyleDiv").parent().css("opacity", $rootScope.shapestyleOpacity); - $rootScope.shapestyleFillColor = $("#" + id).css('background-color'); - $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor); - $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); - $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor); - $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width"); - $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel); - var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel; - var intPart = pixelSeparation.split("p"); + $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); + $("#shapeStyleDiv").parent().css("opacity", $rootScope.shapestyleOpacity); + $rootScope.shapestyleFillColor = $("#" + id).css('background-color'); + $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor); + $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); + $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor); + $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width"); + $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel); + var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel; + var intPart = pixelSeparation.split("p"); - $rootScope.shapestyleborderWidth = intPart[0]; - $rootScope.shapestyleborderStyles = "solid"; + $rootScope.shapestyleborderWidth = intPart[0]; + $rootScope.shapestyleborderStyles = "solid"; - $('#editshapestyle').modal('hide'); + $('#editshapestyle').modal('hide'); - //Edit Shape Style popup should open at it's default position - $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); - + //Edit Shape Style popup should open at it's default position + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); + } } $rootScope.enableAnnotationToolBar = function () { @@ -591,7 +596,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $('.btnCursor').addClass('activebtncolor'); } - $rootScope.DrawRectangleOnOpenModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { + $rootScope.DrawRectangleOnModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { $(canvasId).addLayer({ layer: true, @@ -1161,7 +1166,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", case "Rectangle": $rootScope.rectNumber = $rootScope.ObjectIndex++; - $rootScope.DrawRectangleOnOpenModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); + $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); break; @@ -1202,12 +1207,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", //} } - - - - - - ///----- $rootScope.saveText = function () { @@ -1836,7 +1835,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.switchCanvas(); $("#annotationpaintbrushsize").attr("href", "#"); console.log('ShowListManager') - $rootScope.disableAnnotationtoolOnListManager = true; $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled'); $('#slider-range-min-2').slider('disable'); diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index 1b8b567..6b83062 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -787,13 +787,13 @@