diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index ea68113..027d910 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -61,8 +61,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.modifySavedText = [];
$rootScope.TextRectangleArr = [];
$rootScope.rectDimension = [];
-
- $rootScope.isEraseToolSelected = false;
$rootScope.isMousedownOnPaintCanvas = false;
//opacity code
$rootScope.shapestyleOpacity = 1;
@@ -907,6 +905,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#DrawMode").addClass('annotationtoolbartab');
$rootScope.switchCanvasToPaintCanvas();
var btneraseBrushSizeValue = $("#btnBrushSize").val();
+ $('#canvasPaint').sketch();
$rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue);
$("#annotationpainteraser").attr("data-size", $rootScope.eraseshapeSize);
return $.sketch.tools.eraser = {
@@ -923,20 +922,26 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
}
-
+
}
$rootScope.isShapeSyleOkBtnClicked = false;
+
$rootScope.setPropertiesForShapes = function (id) {
isfilloptionChecked = document.getElementById('fill-option').checked;
isOutlineOptionChecked = document.getElementById('Outline-Option').checked;
$rootScope.isShapeSyleOkBtnClicked = true;
- if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) {
+ if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) {
$("#annotationpaintbrushsize").removeClass('activebtncolor')
$rootScope.switchCanvas();
- }
+ }
+ if ($("#annotationpainteraser").hasClass('activebtncolor')) {
+ $("#annotationpainteraser").removeClass('activebtncolor')
+ $rootScope.switchCanvas();
+
+ }
if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) {
// $('#btnShapeStyle').attr('disabled', 'disabled');
} else {
@@ -1012,6 +1017,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$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)");
@@ -1054,6 +1060,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
// $(".marginTopBtm10 div.outlinediv").css("border-color", x);
//});
} else {
+
document.getElementById('fill-option').checked = isfilloptionChecked;
document.getElementById('Outline-Option').checked = isOutlineOptionChecked;
if (isfilloptionChecked == true) {
@@ -1080,7 +1087,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#borderWidthCanvasElement").css({ "pointer-events": "none" });
$("#outlineColor").css({ "pointer-events": "none" });
}
- var previewBgColor = $("#shapeStyleDiv").css('background-color');
+ var previewBgColor = $("#shapeStyleDiv").css('background-color');
var previewBorderColor = $('#previewBorder').css('border-color');
var previewBorderWidth = $('#previewBorder').css('border-width');
var previewOpacity = $('#previewBorder').css('opacity');
@@ -1092,6 +1099,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$('#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";
@@ -1189,6 +1197,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
$rootScope.DrawRectangleOnModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
+
if ($rootScope.isRectanglePreviewCompleted == true) {
$rootScope.isRectanglePreviewCompleted = false;
$(canvasId).addLayer({
diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html
index 7106d4e..b791b9a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/index.html
+++ b/400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1313,6 +1313,23 @@
-->