Commit eddec163281aeab95001be94ec5d44ea89b52496
1 parent
4006fee4
Commit changes for #9842:Annotation > Font- size problem.
Showing
1 changed file
with
104 additions
and
72 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -80,14 +80,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
80 | 80 | $rootScope.CloseListManager(); |
81 | 81 | angular.element('#modal-settings').modal('hide'); |
82 | 82 | if ($location.url() == "/lab-exercises") { |
83 | - | |
83 | + | |
84 | 84 | $rootScope.menuLabExer = 0; |
85 | 85 | } |
86 | - if($rootScope.menuLabExer==1) | |
87 | - { | |
86 | + if ($rootScope.menuLabExer == 1) { | |
88 | 87 | $rootScope.disableMenuoption = " "; |
89 | 88 | } |
90 | - | |
89 | + | |
91 | 90 | } |
92 | 91 | |
93 | 92 | }); |
... | ... | @@ -140,15 +139,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
140 | 139 | } |
141 | 140 | } |
142 | 141 | |
143 | - // $rootScope.DrawLine = function () { | |
144 | - //$rootScope.isIdetifyClicked = false; | |
145 | - //$rootScope.isDrawingToolSelected = true; | |
146 | - //$rootScope.isLineDrawSelecyed = true; | |
147 | - // $rootScope.shapeType = "Line"; | |
148 | - // alert($rootScope.shapeType); | |
142 | + // $rootScope.DrawLine = function () { | |
143 | + //$rootScope.isIdetifyClicked = false; | |
144 | + //$rootScope.isDrawingToolSelected = true; | |
145 | + //$rootScope.isLineDrawSelecyed = true; | |
146 | + // $rootScope.shapeType = "Line"; | |
147 | + // alert($rootScope.shapeType); | |
149 | 148 | |
150 | 149 | |
151 | - // } | |
150 | + // } | |
152 | 151 | |
153 | 152 | $rootScope.ClearIframe = function () { |
154 | 153 | if ($('#daImagePanel') != null) |
... | ... | @@ -173,16 +172,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
173 | 172 | if ($rootScope.disableAnnotationtoolOnListManager == true) { |
174 | 173 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); |
175 | 174 | $('#slider-range-min-2').slider('disable'); |
176 | - | |
177 | - // $rootScope.disableAnnotationTB = false; | |
178 | - }else | |
179 | - { | |
175 | + | |
176 | + // $rootScope.disableAnnotationTB = false; | |
177 | + } else { | |
180 | 178 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); |
181 | 179 | $('#slider-range-min-2').slider('enable'); |
182 | 180 | } |
183 | - // document.getElementById('modelbackground').style.display = "block"; | |
184 | - // document.getElementById('modeleditstyle').style.display = "block"; | |
185 | - | |
181 | + // document.getElementById('modelbackground').style.display = "block"; | |
182 | + // document.getElementById('modeleditstyle').style.display = "block"; | |
183 | + | |
186 | 184 | } |
187 | 185 | $("#OnIdentify").addClass("annotationtoolbartab"); |
188 | 186 | $("#annotationToolBarOptions").addClass("active"); |
... | ... | @@ -193,7 +191,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
193 | 191 | $rootScope.$broadcast('annotationToolEvent', true); |
194 | 192 | $("#canvasPaint").css("display", "none"); |
195 | 193 | $("#canvas").css("display", "none"); |
196 | - | |
194 | + | |
197 | 195 | var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json'; |
198 | 196 | if ($rootScope.isFontFamilyLoaded == false) { |
199 | 197 | |
... | ... | @@ -207,8 +205,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
207 | 205 | |
208 | 206 | for (var i = 0; i <= $rootScope.AnnotationFontFamily.FontFamily.length - 1; i++) { |
209 | 207 | |
210 | - $("#selected-font-family").append("<option>" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + "</option>"); | |
211 | - | |
208 | + $("#selected-font-family").append("<option value=" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + ">" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + "</option>"); | |
209 | + | |
212 | 210 | } |
213 | 211 | $rootScope.isFontFamilyLoaded = true; |
214 | 212 | |
... | ... | @@ -245,7 +243,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
245 | 243 | $("#DrawMode").removeClass("annotationtoolbartab"); |
246 | 244 | // $rootScope.isIdetifyClicked = true; |
247 | 245 | // $rootScope.isDrawingToolSelected = false; |
248 | - // debugger; | |
246 | + // debugger; | |
249 | 247 | if ($rootScope.CIAnotationIdentifyModeOff == true) { |
250 | 248 | $('.btnCursor').removeClass('activebtncolor'); |
251 | 249 | |
... | ... | @@ -287,19 +285,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
287 | 285 | |
288 | 286 | |
289 | 287 | //----Annotation Toolbar: Jcanvas----- |
290 | - | |
288 | + | |
291 | 289 | $rootScope.DrLine = function (e) { |
292 | 290 | $rootScope.setListManagerZindex = true; |
293 | 291 | $("#canvasPaint").css("display", "block"); |
294 | 292 | $("#canvas").css("display", "block"); |
295 | - | |
293 | + | |
296 | 294 | $rootScope.switchCanvas(); |
297 | 295 | $rootScope.shapeType = "Line"; |
298 | - | |
296 | + | |
299 | 297 | |
300 | 298 | $('.btnCursor').removeClass('activebtncolor'); |
301 | - $(".btn-annotation").removeClass("activebtncolor"); | |
302 | - $(".btn-annotation-line").addClass("activebtncolor"); | |
299 | + $(".btn-annotation").removeClass("activebtncolor"); | |
300 | + $(".btn-annotation-line").addClass("activebtncolor"); | |
303 | 301 | |
304 | 302 | |
305 | 303 | } |
... | ... | @@ -328,7 +326,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
328 | 326 | $('.btnCursor').addClass('activebtncolor'); |
329 | 327 | } |
330 | 328 | |
331 | - | |
329 | + | |
332 | 330 | $rootScope.DrawRectangle = function (e) { |
333 | 331 | $rootScope.setListManagerZindex = true; |
334 | 332 | $("#canvasPaint").css("display", "block"); |
... | ... | @@ -399,7 +397,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
399 | 397 | $(".btn-annotation-arrow").addClass("activebtncolor"); |
400 | 398 | } |
401 | 399 | $rootScope.DrawText = function () { |
402 | - | |
400 | + | |
403 | 401 | $rootScope.setListManagerZindex = true; |
404 | 402 | $("#canvasPaint").css("display", "block"); |
405 | 403 | $("#canvas").css("display", "block"); |
... | ... | @@ -456,7 +454,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
456 | 454 | $rootScope.shapestyleborderWidth = 2; |
457 | 455 | $rootScope.shapestyleborderStyles = "solid"; |
458 | 456 | $rootScope.shapestyle = function (id) { |
459 | - // debugger; | |
457 | + // debugger; | |
460 | 458 | document.getElementById('modelbackground').style.display = "none"; |
461 | 459 | document.getElementById('modeleditstyle').style.display = "none"; |
462 | 460 | |
... | ... | @@ -482,7 +480,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
482 | 480 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
483 | 481 | |
484 | 482 | //Edit Shape Style popup should open at it's default position |
485 | - $("#modeleditstyle").css({ "left": "40%", "right": "0", "top":"70px"}); | |
483 | + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); | |
486 | 484 | |
487 | 485 | } |
488 | 486 | |
... | ... | @@ -527,7 +525,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
527 | 525 | document.getElementById('modelbackground').style.display = "none"; |
528 | 526 | document.getElementById('modeleditstyle').style.display = "none"; |
529 | 527 | //Edit Shape Style popup should open at it's default position |
530 | - $("#modeleditstyle").css({"left":"40%", "right":"0", "top":"70px"}); | |
528 | + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); | |
531 | 529 | |
532 | 530 | |
533 | 531 | } |
... | ... | @@ -536,8 +534,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
536 | 534 | //----End------------- |
537 | 535 | |
538 | 536 | //--Common code of Annotation Toolbar for CI and DA------- |
539 | - $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) | |
540 | - { | |
537 | + $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | |
541 | 538 | $(canvasId).addLayer({ |
542 | 539 | name: 'Line_' + LineNumber, |
543 | 540 | layer: true, |
... | ... | @@ -546,8 +543,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
546 | 543 | strokeStyle: shapestyleborderColor, |
547 | 544 | strokeWidth: shapestyleborderWidth, |
548 | 545 | rounded: true, |
549 | - x1: offsetX1, y1:offsetY1, | |
550 | - x2: x, y2:y, | |
546 | + x1: offsetX1, y1: offsetY1, | |
547 | + x2: x, y2: y, | |
551 | 548 | |
552 | 549 | click: function (layer) { |
553 | 550 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -600,7 +597,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
600 | 597 | $('.btnCursor').addClass('activebtncolor'); |
601 | 598 | } |
602 | 599 | |
603 | - $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x,y) { | |
600 | + $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | |
604 | 601 | $(canvasId).addLayer({ |
605 | 602 | layer: true, |
606 | 603 | name: 'Rect_' + RectNumber, |
... | ... | @@ -687,7 +684,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
687 | 684 | strokeStyle: shapestyleborderColor, |
688 | 685 | strokeWidth: shapestyleborderWidth, |
689 | 686 | fillStyle: shapestyleFillColor, |
690 | - x: offsetX1, y:offsetY1, | |
687 | + x: offsetX1, y: offsetY1, | |
691 | 688 | width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, |
692 | 689 | // Place a handle at each side and each corner |
693 | 690 | handlePlacement: 'both', |
... | ... | @@ -922,11 +919,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
922 | 919 | $('.btnCursor').addClass('activebtncolor'); |
923 | 920 | } |
924 | 921 | |
925 | - $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor,x,y) { | |
922 | + $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) { | |
926 | 923 | |
927 | 924 | |
928 | - | |
929 | - | |
925 | + debugger; | |
926 | + | |
930 | 927 | $('#canvas').drawText({ |
931 | 928 | layer: true, |
932 | 929 | draggable: true, |
... | ... | @@ -985,7 +982,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
985 | 982 | |
986 | 983 | }, |
987 | 984 | dblclick: function (layer) { |
988 | - | |
985 | + | |
989 | 986 | $rootScope.IsTextAlreadySave = false; |
990 | 987 | var RectNameArray = (layer.name).split("_"); |
991 | 988 | |
... | ... | @@ -1000,10 +997,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1000 | 997 | $("#annotationTextModal").modal("toggle"); |
1001 | 998 | |
1002 | 999 | $("#text_area").val(''); |
1003 | - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1000 | + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1004 | 1001 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); |
1005 | 1002 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); |
1006 | 1003 | |
1004 | + $("#selected-font-family option:eq(0)").prop('selected', true); | |
1005 | + $("#selected-font-size option:eq(0)").prop('selected', true); | |
1006 | + | |
1007 | 1007 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); |
1008 | 1008 | |
1009 | 1009 | $("#text-bold").removeClass("ActiveFormattingButtonClass"); |
... | ... | @@ -1047,9 +1047,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1047 | 1047 | |
1048 | 1048 | } |
1049 | 1049 | }); |
1050 | - // Annotation: Edit Text option is missing. | |
1051 | - // alert($rootScope.CurrentWidth); | |
1052 | - // alert($rootScope.CurrentHeight); | |
1050 | + // Annotation: Edit Text option is missing. | |
1051 | + // alert($rootScope.CurrentWidth); | |
1052 | + // alert($rootScope.CurrentHeight); | |
1053 | 1053 | $("#annotationTextModal").css("padding-right", "0px"); |
1054 | 1054 | if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { |
1055 | 1055 | $("#annotationTextModal").modal("toggle"); |
... | ... | @@ -1060,7 +1060,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1060 | 1060 | |
1061 | 1061 | $("#text_area").val(''); |
1062 | 1062 | |
1063 | - $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1063 | + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1064 | + | |
1065 | + $("#selected-font-family option:eq(0)").prop('selected', true); | |
1066 | + $("#selected-font-size option:eq(0)").prop('selected', true); | |
1067 | + | |
1068 | + // $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1064 | 1069 | |
1065 | 1070 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); |
1066 | 1071 | |
... | ... | @@ -1079,7 +1084,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1079 | 1084 | $('.btnCursor').addClass('activebtncolor'); |
1080 | 1085 | |
1081 | 1086 | |
1082 | - | |
1087 | + | |
1083 | 1088 | } |
1084 | 1089 | |
1085 | 1090 | |
... | ... | @@ -1107,7 +1112,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1107 | 1112 | ctx.clearRect(0, 0, 2277, 3248); |
1108 | 1113 | $rootScope.clicked = true; |
1109 | 1114 | |
1110 | - // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1); | |
1115 | + // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1); | |
1111 | 1116 | } |
1112 | 1117 | |
1113 | 1118 | $rootScope.rectNumber = 0; |
... | ... | @@ -1189,7 +1194,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1189 | 1194 | |
1190 | 1195 | break; |
1191 | 1196 | case "TextArea": |
1192 | - | |
1197 | + | |
1193 | 1198 | $rootScope.IsTextAlreadySave = false; |
1194 | 1199 | $("#text_area").val(''); |
1195 | 1200 | // Draw text |
... | ... | @@ -1208,13 +1213,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1208 | 1213 | } |
1209 | 1214 | |
1210 | 1215 | |
1211 | - | |
1216 | + | |
1212 | 1217 | |
1213 | 1218 | |
1214 | 1219 | |
1215 | 1220 | ///----- |
1216 | 1221 | |
1217 | 1222 | $rootScope.saveText = function () { |
1223 | + debugger; | |
1218 | 1224 | document.getElementById('modelbackground').style.display = "none"; |
1219 | 1225 | // this part will work first time when save button will be clicked |
1220 | 1226 | if ($rootScope.IsTextAlreadySave == false) { |
... | ... | @@ -1296,7 +1302,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1296 | 1302 | }).drawLayers(); |
1297 | 1303 | }, |
1298 | 1304 | dblclick: function (layer) { |
1299 | - | |
1305 | + | |
1300 | 1306 | $rootScope.isTextAreaClosedButtonActive = false; |
1301 | 1307 | $rootScope.IsTextAlreadySave = true; |
1302 | 1308 | |
... | ... | @@ -1347,7 +1353,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1347 | 1353 | $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration); |
1348 | 1354 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor }); |
1349 | 1355 | |
1356 | + var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily; | |
1357 | + // alert(CurrentFontFamily); | |
1358 | + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, ""); | |
1359 | + var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize); | |
1360 | + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true); | |
1361 | + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true); | |
1350 | 1362 | |
1363 | + CurrentFontFamily = ''; | |
1364 | + CurrentFontSize = ''; | |
1351 | 1365 | |
1352 | 1366 | // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); |
1353 | 1367 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); |
... | ... | @@ -1456,7 +1470,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1456 | 1470 | document.getElementById('modelbackground').style.display = "block"; |
1457 | 1471 | $("#annotationTextModal").modal("toggle"); |
1458 | 1472 | |
1459 | - | |
1473 | + // $("#selected-font-family").val(CurrentFontFamily); | |
1474 | + // $("#selected-font-size").val(CurrentFontSize); | |
1460 | 1475 | |
1461 | 1476 | |
1462 | 1477 | }, |
... | ... | @@ -1488,7 +1503,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1488 | 1503 | } |
1489 | 1504 | }); |
1490 | 1505 | $("#text_area").val(''); |
1491 | - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1506 | + $("#text_area").css({ " font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
1507 | + | |
1508 | + $("#selected-font-family option:eq(0)").prop('selected', true); | |
1509 | + $("#selected-font-size option:eq(0)").prop('selected', true); | |
1510 | + | |
1511 | + // $("#selected-font-family option:eq(0)").prop('selected', true); | |
1512 | + // $("#selected-font-size option:eq(0)").prop('selected', true); | |
1513 | + | |
1514 | + // $("#selected-font-family option[value='Arial']").prop('selected', true); | |
1515 | + // $("#selected-font-size option[value=14]").prop('selected', true); | |
1492 | 1516 | |
1493 | 1517 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); |
1494 | 1518 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); |
... | ... | @@ -1582,8 +1606,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1582 | 1606 | |
1583 | 1607 | }, |
1584 | 1608 | dblclick: function (layer) { |
1585 | - | |
1586 | - | |
1609 | + | |
1610 | + | |
1587 | 1611 | $rootScope.isTextAreaClosedButtonActive = false; |
1588 | 1612 | $rootScope.IsTextAlreadySave = true; |
1589 | 1613 | var _rectLayerOnSave = layer.name; |
... | ... | @@ -1605,9 +1629,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1605 | 1629 | $("#text_area").css("font-family", _modifiedFontFamily); |
1606 | 1630 | $("#text_area").css("text-decoration", _modifiedFontDecoration); |
1607 | 1631 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor }); |
1632 | + | |
1608 | 1633 | // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" }); |
1609 | 1634 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); |
1610 | 1635 | |
1636 | + //khushbu | |
1637 | + var CurrentFontFamily = _modifiedFontFamily; | |
1638 | + // alert(CurrentFontFamily); | |
1639 | + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, ""); | |
1640 | + var CurrentFontSize = parseInt(_modifiedFontSize); | |
1641 | + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true); | |
1642 | + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true); | |
1643 | + CurrentFontFamily = ''; | |
1644 | + CurrentFontSize = ''; | |
1611 | 1645 | //adding text text decoration active class in text edit pop-up |
1612 | 1646 | if (_modifiedFontDecoration == "underline") { |
1613 | 1647 | $("#text-underline").addClass("ActiveFormattingButtonClass"); |
... | ... | @@ -1694,16 +1728,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1694 | 1728 | |
1695 | 1729 | $rootScope.BindCanvasDrawingListners = function (event) { |
1696 | 1730 | |
1697 | - $rootScope.clicked = true; | |
1698 | - // OnPaintCanvasMouseDown(event); | |
1731 | + $rootScope.clicked = true; | |
1732 | + // OnPaintCanvasMouseDown(event); | |
1699 | 1733 | |
1700 | - var annotationCanvas = document.getElementById('canvas'); | |
1701 | - if (annotationCanvas != null || annotationCanvas != undefined) { | |
1702 | - annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintCanvasMouseDown, false); | |
1703 | - annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false); | |
1704 | - } | |
1705 | - // alert("doclick"); | |
1706 | - }; | |
1734 | + var annotationCanvas = document.getElementById('canvas'); | |
1735 | + if (annotationCanvas != null || annotationCanvas != undefined) { | |
1736 | + annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintCanvasMouseDown, false); | |
1737 | + annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false); | |
1738 | + } | |
1739 | + // alert("doclick"); | |
1740 | + }; | |
1707 | 1741 | |
1708 | 1742 | |
1709 | 1743 | $(document).keydown(function (event) { |
... | ... | @@ -1743,7 +1777,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1743 | 1777 | $rootScope.closeModal = function () { |
1744 | 1778 | |
1745 | 1779 | document.getElementById('modelbackground').style.display = "none"; |
1746 | - | |
1780 | + | |
1747 | 1781 | //if ($rootScope.isTextAreaClosedButtonActive == true) { |
1748 | 1782 | // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); |
1749 | 1783 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
... | ... | @@ -1831,15 +1865,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1831 | 1865 | } |
1832 | 1866 | |
1833 | 1867 | $rootScope.disableAnnotationTB = false; |
1834 | - $rootScope.disableAnnotationTBFn = function() | |
1835 | - { | |
1868 | + $rootScope.disableAnnotationTBFn = function () { | |
1836 | 1869 | $rootScope.disableAnnotationTB = true; |
1837 | 1870 | } |
1838 | 1871 | |
1839 | 1872 | //list manager function |
1840 | 1873 | |
1841 | 1874 | //list manager function |
1842 | - | |
1875 | + | |
1843 | 1876 | $rootScope.disableAnnotationtoolOnListManager = false; |
1844 | 1877 | $rootScope.ShowListManager = function () { |
1845 | 1878 | console.log('ShowListManager') |
... | ... | @@ -1864,7 +1897,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1864 | 1897 | console.log('close') |
1865 | 1898 | $rootScope.disableAnnotationtoolOnListManager = false; |
1866 | 1899 | if ($rootScope.MenuModuleName == "DA") { |
1867 | - | |
1900 | + | |
1868 | 1901 | if ($rootScope.disableAnnotationtoolOnListManager == false) { |
1869 | 1902 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); |
1870 | 1903 | $('#slider-range-min-2').slider('enable'); |
... | ... | @@ -2038,8 +2071,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
2038 | 2071 | if (len > 0) { |
2039 | 2072 | $rootScope.reloadChildController(); |
2040 | 2073 | } |
2041 | - else | |
2042 | - { | |
2074 | + else { | |
2043 | 2075 | $('#modal-settings').modal('hide'); |
2044 | 2076 | } |
2045 | 2077 | ... | ... |