diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 4d57ae9..7b8e4a8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -476,9 +476,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $(".btn-annotation-erase").addClass("activebtncolor"); } - + $rootScope.isShapeSyleOkBtnClicked = false; $rootScope.setPropertiesForShapes = function (id) { - + $rootScope.isShapeSyleOkBtnClicked = true; if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { // $('#btnShapeStyle').attr('disabled', 'disabled'); @@ -555,12 +555,39 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.disableAnnotationToolBar = function () { - + if ($rootScope.isShapeSyleOkBtnClicked == false) { + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)"); + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)"); + var previewBorderColor = $("#outlineColor span.minicolors-swatch-color").css('background-color'); + $(".marginTopBtm10 div.outlinediv").css("border-color", previewBorderColor); + var previewBgColor = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color'); + $("#imgOpacity").css("background-color", previewBgColor); + $('#borderWidthCanvasElement').val(1); + $('.marginTopBtm10 div.outlinediv').css("border-width", 1); + $("#imgOpacity").css("opacity", 1); + $(".marginTopBtm10 div.outlinediv").css("opacity", 1); + //$("#borderWidthCanvasElement").change(function () { + // $(".marginTopBtm10 div.outlinediv").css("border-color", x); + //}); + } else { + var previewBgColor = $("#shapeStyleDiv").css('background-color'); + var previewBorderColor = $('#previewBorder').css('border-color'); + var previewBorderWidth = $('#previewBorder').css('border-width'); + var previewOpacity = $('#previewBorder').css('opacity'); + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", previewBgColor); + $("#imgOpacity").css("background-color", previewBgColor); + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", previewBorderColor); + $(".marginTopBtm10 div.outlinediv").css("border-color", previewBorderColor); + $('.marginTopBtm10 div.outlinediv').css("border-width", previewBorderWidth); + $('#borderWidthCanvasElement').val(previewBorderWidth.split("px")); + $("#imgOpacity").css("opacity", previewOpacity); + $(".marginTopBtm10 div.outlinediv").css("opacity", previewOpacity); + } document.getElementById('modelbackground').style.display = "none"; document.getElementById('modeleditstyle').style.display = "none"; //Edit Shape Style popup should open at it's default position $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); - + } diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index b55508b..d566cb4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -524,7 +524,7 @@ -
+
@@ -1471,9 +1471,9 @@ var borderWidth = 1; var borderColor = "#000"; $("#borderWidthCanvasElement").change(function () { - borderWidth = $(this).val(); - + borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color"); + if (borderColor != null) { document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); @@ -1582,8 +1582,7 @@ slide: function (event, ui) { $(".marginTopBtm10 .imgopacity").css("opacity", ui.value); - // $("#slider-value").html(ui.value); - + $(".marginTopBtm10 div.outlinediv").css("opacity", ui.value); } } diff --git a/400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css b/400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css index facb604..ce16ab2 100644 --- a/400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css +++ b/400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css @@ -920,7 +920,7 @@ background-size:cover; } .outlinediv { - /*border:1px solid black;*/ + border:1px solid black; width: 72%; margin-left: auto; margin-right: auto;