Commit 9e7890ba8ed9a6686c774fd27bc8afa71e0e1a90

Authored by Amrita Vishnoi
2 parents adbef95c 54e1c49e

Against Merge Request : #274

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -476,9 +476,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -476,9 +476,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
476 $(".btn-annotation-erase").addClass("activebtncolor"); 476 $(".btn-annotation-erase").addClass("activebtncolor");
477 } 477 }
478 478
479 - 479 + $rootScope.isShapeSyleOkBtnClicked = false;
480 $rootScope.setPropertiesForShapes = function (id) { 480 $rootScope.setPropertiesForShapes = function (id) {
481 - 481 + $rootScope.isShapeSyleOkBtnClicked = true;
482 482
483 if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { 483 if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) {
484 // $('#btnShapeStyle').attr('disabled', 'disabled'); 484 // $('#btnShapeStyle').attr('disabled', 'disabled');
@@ -555,12 +555,39 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -555,12 +555,39 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
555 555
556 556
557 $rootScope.disableAnnotationToolBar = function () { 557 $rootScope.disableAnnotationToolBar = function () {
558 - 558 + if ($rootScope.isShapeSyleOkBtnClicked == false) {
  559 + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)");
  560 + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)");
  561 + var previewBorderColor = $("#outlineColor span.minicolors-swatch-color").css('background-color');
  562 + $(".marginTopBtm10 div.outlinediv").css("border-color", previewBorderColor);
  563 + var previewBgColor = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color');
  564 + $("#imgOpacity").css("background-color", previewBgColor);
  565 + $('#borderWidthCanvasElement').val(1);
  566 + $('.marginTopBtm10 div.outlinediv').css("border-width", 1);
  567 + $("#imgOpacity").css("opacity", 1);
  568 + $(".marginTopBtm10 div.outlinediv").css("opacity", 1);
  569 + //$("#borderWidthCanvasElement").change(function () {
  570 + // $(".marginTopBtm10 div.outlinediv").css("border-color", x);
  571 + //});
  572 + } else {
  573 + var previewBgColor = $("#shapeStyleDiv").css('background-color');
  574 + var previewBorderColor = $('#previewBorder').css('border-color');
  575 + var previewBorderWidth = $('#previewBorder').css('border-width');
  576 + var previewOpacity = $('#previewBorder').css('opacity');
  577 + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", previewBgColor);
  578 + $("#imgOpacity").css("background-color", previewBgColor);
  579 + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", previewBorderColor);
  580 + $(".marginTopBtm10 div.outlinediv").css("border-color", previewBorderColor);
  581 + $('.marginTopBtm10 div.outlinediv').css("border-width", previewBorderWidth);
  582 + $('#borderWidthCanvasElement').val(previewBorderWidth.split("px"));
  583 + $("#imgOpacity").css("opacity", previewOpacity);
  584 + $(".marginTopBtm10 div.outlinediv").css("opacity", previewOpacity);
  585 + }
559 document.getElementById('modelbackground').style.display = "none"; 586 document.getElementById('modelbackground').style.display = "none";
560 document.getElementById('modeleditstyle').style.display = "none"; 587 document.getElementById('modeleditstyle').style.display = "none";
561 //Edit Shape Style popup should open at it's default position 588 //Edit Shape Style popup should open at it's default position
562 $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); 589 $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
563 - 590 +
564 } 591 }
565 592
566 593
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -524,7 +524,7 @@ @@ -524,7 +524,7 @@
524 <!--#7931--> 524 <!--#7931-->
525 525
526 <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div> 526 <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div>
527 - <div class="outlinediv" style="border: 1px solid #000000;" ng-mouseover="mouseMoveToolTip(170, 170, 120, 'Edit Style')" ng-mouseleave="mouseOutToolTip()"> 527 + <div id="previewBorder" class="outlinediv" ng-mouseover="mouseMoveToolTip(170, 170, 120, 'Edit Style')" ng-mouseleave="mouseOutToolTip()">
528 <div id="shapeStyleDiv" style="background-color: #ffffff;" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()"> 528 <div id="shapeStyleDiv" style="background-color: #ffffff;" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()">
529 529
530 </div> 530 </div>
@@ -1471,9 +1471,9 @@ @@ -1471,9 +1471,9 @@
1471 var borderWidth = 1; 1471 var borderWidth = 1;
1472 var borderColor = "#000"; 1472 var borderColor = "#000";
1473 $("#borderWidthCanvasElement").change(function () { 1473 $("#borderWidthCanvasElement").change(function () {
1474 -  
1475 borderWidth = $(this).val(); 1474 borderWidth = $(this).val();
1476 - 1475 + borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color");
  1476 +
1477 if (borderColor != null) { 1477 if (borderColor != null) {
1478 document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; 1478 document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
1479 //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); 1479 //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
@@ -1582,8 +1582,7 @@ @@ -1582,8 +1582,7 @@
1582 slide: function (event, ui) { 1582 slide: function (event, ui) {
1583 1583
1584 $(".marginTopBtm10 .imgopacity").css("opacity", ui.value); 1584 $(".marginTopBtm10 .imgopacity").css("opacity", ui.value);
1585 - // $("#slider-value").html(ui.value);  
1586 - 1585 + $(".marginTopBtm10 div.outlinediv").css("opacity", ui.value);
1587 } 1586 }
1588 1587
1589 } 1588 }
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
@@ -920,7 +920,7 @@ background-size:cover; @@ -920,7 +920,7 @@ background-size:cover;
920 } 920 }
921 .outlinediv 921 .outlinediv
922 { 922 {
923 - /*border:1px solid black;*/ 923 + border:1px solid black;
924 width: 72%; 924 width: 72%;
925 margin-left: auto; 925 margin-left: auto;
926 margin-right: auto; 926 margin-right: auto;