Commit ebd198170862b03224a5da3cdbeb53bf98e1eb9a
1 parent
78a9f926
this is complete bug for 12310
Showing
2 changed files
with
37 additions
and
11 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -61,8 +61,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
61 | 61 | $rootScope.modifySavedText = []; |
62 | 62 | $rootScope.TextRectangleArr = []; |
63 | 63 | $rootScope.rectDimension = []; |
64 | - | |
65 | - $rootScope.isEraseToolSelected = false; | |
66 | 64 | $rootScope.isMousedownOnPaintCanvas = false; |
67 | 65 | //opacity code |
68 | 66 | $rootScope.shapestyleOpacity = 1; |
... | ... | @@ -907,6 +905,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
907 | 905 | $("#DrawMode").addClass('annotationtoolbartab'); |
908 | 906 | $rootScope.switchCanvasToPaintCanvas(); |
909 | 907 | var btneraseBrushSizeValue = $("#btnBrushSize").val(); |
908 | + $('#canvasPaint').sketch(); | |
910 | 909 | $rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue); |
911 | 910 | $("#annotationpainteraser").attr("data-size", $rootScope.eraseshapeSize); |
912 | 911 | return $.sketch.tools.eraser = { |
... | ... | @@ -923,20 +922,26 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
923 | 922 | } |
924 | 923 | } |
925 | 924 | |
926 | - | |
925 | + | |
927 | 926 | |
928 | 927 | } |
929 | 928 | |
930 | 929 | $rootScope.isShapeSyleOkBtnClicked = false; |
930 | + | |
931 | 931 | $rootScope.setPropertiesForShapes = function (id) { |
932 | 932 | isfilloptionChecked = document.getElementById('fill-option').checked; |
933 | 933 | isOutlineOptionChecked = document.getElementById('Outline-Option').checked; |
934 | 934 | $rootScope.isShapeSyleOkBtnClicked = true; |
935 | - if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) { | |
935 | + if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) { | |
936 | 936 | $("#annotationpaintbrushsize").removeClass('activebtncolor') |
937 | 937 | $rootScope.switchCanvas(); |
938 | 938 | |
939 | - } | |
939 | + } | |
940 | + if ($("#annotationpainteraser").hasClass('activebtncolor')) { | |
941 | + $("#annotationpainteraser").removeClass('activebtncolor') | |
942 | + $rootScope.switchCanvas(); | |
943 | + | |
944 | + } | |
940 | 945 | if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { |
941 | 946 | // $('#btnShapeStyle').attr('disabled', 'disabled'); |
942 | 947 | } else { |
... | ... | @@ -1012,6 +1017,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1012 | 1017 | |
1013 | 1018 | |
1014 | 1019 | $rootScope.disableAnnotationToolBar = function () { |
1020 | + | |
1015 | 1021 | if ($rootScope.isShapeSyleOkBtnClicked == false) { |
1016 | 1022 | $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)"); |
1017 | 1023 | $('#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 |
1054 | 1060 | // $(".marginTopBtm10 div.outlinediv").css("border-color", x); |
1055 | 1061 | //}); |
1056 | 1062 | } else { |
1063 | + | |
1057 | 1064 | document.getElementById('fill-option').checked = isfilloptionChecked; |
1058 | 1065 | document.getElementById('Outline-Option').checked = isOutlineOptionChecked; |
1059 | 1066 | if (isfilloptionChecked == true) { |
... | ... | @@ -1080,7 +1087,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1080 | 1087 | $("#borderWidthCanvasElement").css({ "pointer-events": "none" }); |
1081 | 1088 | $("#outlineColor").css({ "pointer-events": "none" }); |
1082 | 1089 | } |
1083 | - var previewBgColor = $("#shapeStyleDiv").css('background-color'); | |
1090 | + var previewBgColor = $("#shapeStyleDiv").css('background-color'); | |
1084 | 1091 | var previewBorderColor = $('#previewBorder').css('border-color'); |
1085 | 1092 | var previewBorderWidth = $('#previewBorder').css('border-width'); |
1086 | 1093 | var previewOpacity = $('#previewBorder').css('opacity'); |
... | ... | @@ -1092,6 +1099,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1092 | 1099 | $('#borderWidthCanvasElement').val(previewBorderWidth.split("px")); |
1093 | 1100 | $("#imgOpacity").css("opacity", previewOpacity); |
1094 | 1101 | $(".marginTopBtm10 div.outlinediv").css("opacity", previewOpacity); |
1102 | + | |
1095 | 1103 | } |
1096 | 1104 | document.getElementById('modelbackground').style.display = "none"; |
1097 | 1105 | document.getElementById('modeleditstyle').style.display = "none"; |
... | ... | @@ -1189,6 +1197,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1189 | 1197 | } |
1190 | 1198 | |
1191 | 1199 | $rootScope.DrawRectangleOnModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { |
1200 | + | |
1192 | 1201 | if ($rootScope.isRectanglePreviewCompleted == true) { |
1193 | 1202 | $rootScope.isRectanglePreviewCompleted = false; |
1194 | 1203 | $(canvasId).addLayer({ | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -1313,6 +1313,23 @@ |
1313 | 1313 | </script>--> |
1314 | 1314 | |
1315 | 1315 | <script> |
1316 | + function onBrushSizeChange() | |
1317 | + { | |
1318 | + $('.btnCursor').addClass('activebtncolor'); | |
1319 | + $(".btn-annotation").removeClass("activebtncolor"); | |
1320 | + $(".btn-annotation-erase").removeClass("activebtncolor"); | |
1321 | + $(".btn-annotation-erase").removeClass("activebtncolor"); | |
1322 | + $(".annotationpaintbrushsize").removeClass("activebtncolor"); | |
1323 | + var x = $('#canvasPaint').css("z-index"); | |
1324 | + | |
1325 | + var y = $('#canvas').css("z-index"); | |
1326 | + if (x > y) { | |
1327 | + y = parseInt(x) + 1; | |
1328 | + } else { | |
1329 | + y = parseInt(y) + 1; | |
1330 | + } | |
1331 | + $('#canvas').css("z-index", y); | |
1332 | + } | |
1316 | 1333 | $(function () { |
1317 | 1334 | $("#slider-range-min-2").slider({ |
1318 | 1335 | range: "min", |
... | ... | @@ -1320,7 +1337,7 @@ |
1320 | 1337 | max: 60, |
1321 | 1338 | value: 1, |
1322 | 1339 | slide: function (event, ui) { |
1323 | - | |
1340 | + onBrushSizeChange(); | |
1324 | 1341 | $("#btnBrushSize").val(ui.value); |
1325 | 1342 | |
1326 | 1343 | }, |
... | ... | @@ -1334,17 +1351,17 @@ |
1334 | 1351 | |
1335 | 1352 | |
1336 | 1353 | $("#btnBrushSize").keydown(function () { |
1337 | - | |
1354 | + onBrushSizeChange(); | |
1338 | 1355 | var brushSizevalue = this.value; |
1339 | 1356 | $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); |
1340 | 1357 | }); |
1341 | 1358 | $("#btnBrushSize").keyup(function () { |
1342 | - | |
1359 | + onBrushSizeChange(); | |
1343 | 1360 | var brushSizevalue = this.value; |
1344 | 1361 | $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); |
1345 | 1362 | }); |
1346 | 1363 | $("#btnBrushSizeIncrement").click(function () { |
1347 | - | |
1364 | + abc(); | |
1348 | 1365 | var brushIncrementVar = $("#btnBrushSize").val(); |
1349 | 1366 | if (brushIncrementVar >= 60) { |
1350 | 1367 | $("#slider-range-min-2").slider("value", 60); |
... | ... | @@ -1361,7 +1378,7 @@ |
1361 | 1378 | } |
1362 | 1379 | }); |
1363 | 1380 | $("#btnBrushSizeDecrease").click(function () { |
1364 | - | |
1381 | + onBrushSizeChange(); | |
1365 | 1382 | var brushDecreaseVar = $("#btnBrushSize").val(); |
1366 | 1383 | if (brushDecreaseVar == "") { |
1367 | 1384 | var brushDecrementedValue = 1; | ... | ... |