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,14 +80,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
80 | $rootScope.CloseListManager(); | 80 | $rootScope.CloseListManager(); |
81 | angular.element('#modal-settings').modal('hide'); | 81 | angular.element('#modal-settings').modal('hide'); |
82 | if ($location.url() == "/lab-exercises") { | 82 | if ($location.url() == "/lab-exercises") { |
83 | - | 83 | + |
84 | $rootScope.menuLabExer = 0; | 84 | $rootScope.menuLabExer = 0; |
85 | } | 85 | } |
86 | - if($rootScope.menuLabExer==1) | ||
87 | - { | 86 | + if ($rootScope.menuLabExer == 1) { |
88 | $rootScope.disableMenuoption = " "; | 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,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 | $rootScope.ClearIframe = function () { | 152 | $rootScope.ClearIframe = function () { |
154 | if ($('#daImagePanel') != null) | 153 | if ($('#daImagePanel') != null) |
@@ -173,16 +172,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -173,16 +172,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
173 | if ($rootScope.disableAnnotationtoolOnListManager == true) { | 172 | if ($rootScope.disableAnnotationtoolOnListManager == true) { |
174 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); | 173 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); |
175 | $('#slider-range-min-2').slider('disable'); | 174 | $('#slider-range-min-2').slider('disable'); |
176 | - | ||
177 | - // $rootScope.disableAnnotationTB = false; | ||
178 | - }else | ||
179 | - { | 175 | + |
176 | + // $rootScope.disableAnnotationTB = false; | ||
177 | + } else { | ||
180 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); | 178 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); |
181 | $('#slider-range-min-2').slider('enable'); | 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 | $("#OnIdentify").addClass("annotationtoolbartab"); | 185 | $("#OnIdentify").addClass("annotationtoolbartab"); |
188 | $("#annotationToolBarOptions").addClass("active"); | 186 | $("#annotationToolBarOptions").addClass("active"); |
@@ -193,7 +191,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -193,7 +191,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
193 | $rootScope.$broadcast('annotationToolEvent', true); | 191 | $rootScope.$broadcast('annotationToolEvent', true); |
194 | $("#canvasPaint").css("display", "none"); | 192 | $("#canvasPaint").css("display", "none"); |
195 | $("#canvas").css("display", "none"); | 193 | $("#canvas").css("display", "none"); |
196 | - | 194 | + |
197 | var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json'; | 195 | var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json'; |
198 | if ($rootScope.isFontFamilyLoaded == false) { | 196 | if ($rootScope.isFontFamilyLoaded == false) { |
199 | 197 | ||
@@ -207,8 +205,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -207,8 +205,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
207 | 205 | ||
208 | for (var i = 0; i <= $rootScope.AnnotationFontFamily.FontFamily.length - 1; i++) { | 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 | $rootScope.isFontFamilyLoaded = true; | 211 | $rootScope.isFontFamilyLoaded = true; |
214 | 212 | ||
@@ -245,7 +243,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -245,7 +243,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
245 | $("#DrawMode").removeClass("annotationtoolbartab"); | 243 | $("#DrawMode").removeClass("annotationtoolbartab"); |
246 | // $rootScope.isIdetifyClicked = true; | 244 | // $rootScope.isIdetifyClicked = true; |
247 | // $rootScope.isDrawingToolSelected = false; | 245 | // $rootScope.isDrawingToolSelected = false; |
248 | - // debugger; | 246 | + // debugger; |
249 | if ($rootScope.CIAnotationIdentifyModeOff == true) { | 247 | if ($rootScope.CIAnotationIdentifyModeOff == true) { |
250 | $('.btnCursor').removeClass('activebtncolor'); | 248 | $('.btnCursor').removeClass('activebtncolor'); |
251 | 249 | ||
@@ -287,19 +285,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -287,19 +285,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
287 | 285 | ||
288 | 286 | ||
289 | //----Annotation Toolbar: Jcanvas----- | 287 | //----Annotation Toolbar: Jcanvas----- |
290 | - | 288 | + |
291 | $rootScope.DrLine = function (e) { | 289 | $rootScope.DrLine = function (e) { |
292 | $rootScope.setListManagerZindex = true; | 290 | $rootScope.setListManagerZindex = true; |
293 | $("#canvasPaint").css("display", "block"); | 291 | $("#canvasPaint").css("display", "block"); |
294 | $("#canvas").css("display", "block"); | 292 | $("#canvas").css("display", "block"); |
295 | - | 293 | + |
296 | $rootScope.switchCanvas(); | 294 | $rootScope.switchCanvas(); |
297 | $rootScope.shapeType = "Line"; | 295 | $rootScope.shapeType = "Line"; |
298 | - | 296 | + |
299 | 297 | ||
300 | $('.btnCursor').removeClass('activebtncolor'); | 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,7 +326,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
328 | $('.btnCursor').addClass('activebtncolor'); | 326 | $('.btnCursor').addClass('activebtncolor'); |
329 | } | 327 | } |
330 | 328 | ||
331 | - | 329 | + |
332 | $rootScope.DrawRectangle = function (e) { | 330 | $rootScope.DrawRectangle = function (e) { |
333 | $rootScope.setListManagerZindex = true; | 331 | $rootScope.setListManagerZindex = true; |
334 | $("#canvasPaint").css("display", "block"); | 332 | $("#canvasPaint").css("display", "block"); |
@@ -399,7 +397,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -399,7 +397,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
399 | $(".btn-annotation-arrow").addClass("activebtncolor"); | 397 | $(".btn-annotation-arrow").addClass("activebtncolor"); |
400 | } | 398 | } |
401 | $rootScope.DrawText = function () { | 399 | $rootScope.DrawText = function () { |
402 | - | 400 | + |
403 | $rootScope.setListManagerZindex = true; | 401 | $rootScope.setListManagerZindex = true; |
404 | $("#canvasPaint").css("display", "block"); | 402 | $("#canvasPaint").css("display", "block"); |
405 | $("#canvas").css("display", "block"); | 403 | $("#canvas").css("display", "block"); |
@@ -456,7 +454,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -456,7 +454,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
456 | $rootScope.shapestyleborderWidth = 2; | 454 | $rootScope.shapestyleborderWidth = 2; |
457 | $rootScope.shapestyleborderStyles = "solid"; | 455 | $rootScope.shapestyleborderStyles = "solid"; |
458 | $rootScope.shapestyle = function (id) { | 456 | $rootScope.shapestyle = function (id) { |
459 | - // debugger; | 457 | + // debugger; |
460 | document.getElementById('modelbackground').style.display = "none"; | 458 | document.getElementById('modelbackground').style.display = "none"; |
461 | document.getElementById('modeleditstyle').style.display = "none"; | 459 | document.getElementById('modeleditstyle').style.display = "none"; |
462 | 460 | ||
@@ -482,7 +480,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -482,7 +480,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
482 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | 480 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
483 | 481 | ||
484 | //Edit Shape Style popup should open at it's default position | 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,7 +525,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
527 | document.getElementById('modelbackground').style.display = "none"; | 525 | document.getElementById('modelbackground').style.display = "none"; |
528 | document.getElementById('modeleditstyle').style.display = "none"; | 526 | document.getElementById('modeleditstyle').style.display = "none"; |
529 | //Edit Shape Style popup should open at it's default position | 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,8 +534,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
536 | //----End------------- | 534 | //----End------------- |
537 | 535 | ||
538 | //--Common code of Annotation Toolbar for CI and DA------- | 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 | $(canvasId).addLayer({ | 538 | $(canvasId).addLayer({ |
542 | name: 'Line_' + LineNumber, | 539 | name: 'Line_' + LineNumber, |
543 | layer: true, | 540 | layer: true, |
@@ -546,8 +543,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -546,8 +543,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
546 | strokeStyle: shapestyleborderColor, | 543 | strokeStyle: shapestyleborderColor, |
547 | strokeWidth: shapestyleborderWidth, | 544 | strokeWidth: shapestyleborderWidth, |
548 | rounded: true, | 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 | click: function (layer) { | 549 | click: function (layer) { |
553 | $rootScope.canvasLayerNameCollection = []; | 550 | $rootScope.canvasLayerNameCollection = []; |
@@ -600,7 +597,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -600,7 +597,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
600 | $('.btnCursor').addClass('activebtncolor'); | 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 | $(canvasId).addLayer({ | 601 | $(canvasId).addLayer({ |
605 | layer: true, | 602 | layer: true, |
606 | name: 'Rect_' + RectNumber, | 603 | name: 'Rect_' + RectNumber, |
@@ -687,7 +684,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -687,7 +684,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
687 | strokeStyle: shapestyleborderColor, | 684 | strokeStyle: shapestyleborderColor, |
688 | strokeWidth: shapestyleborderWidth, | 685 | strokeWidth: shapestyleborderWidth, |
689 | fillStyle: shapestyleFillColor, | 686 | fillStyle: shapestyleFillColor, |
690 | - x: offsetX1, y:offsetY1, | 687 | + x: offsetX1, y: offsetY1, |
691 | width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, | 688 | width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, |
692 | // Place a handle at each side and each corner | 689 | // Place a handle at each side and each corner |
693 | handlePlacement: 'both', | 690 | handlePlacement: 'both', |
@@ -922,11 +919,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -922,11 +919,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
922 | $('.btnCursor').addClass('activebtncolor'); | 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 | $('#canvas').drawText({ | 927 | $('#canvas').drawText({ |
931 | layer: true, | 928 | layer: true, |
932 | draggable: true, | 929 | draggable: true, |
@@ -985,7 +982,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -985,7 +982,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
985 | 982 | ||
986 | }, | 983 | }, |
987 | dblclick: function (layer) { | 984 | dblclick: function (layer) { |
988 | - | 985 | + |
989 | $rootScope.IsTextAlreadySave = false; | 986 | $rootScope.IsTextAlreadySave = false; |
990 | var RectNameArray = (layer.name).split("_"); | 987 | var RectNameArray = (layer.name).split("_"); |
991 | 988 | ||
@@ -1000,10 +997,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1000,10 +997,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1000 | $("#annotationTextModal").modal("toggle"); | 997 | $("#annotationTextModal").modal("toggle"); |
1001 | 998 | ||
1002 | $("#text_area").val(''); | 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 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | 1001 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); |
1005 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | 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 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); | 1007 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); |
1008 | 1008 | ||
1009 | $("#text-bold").removeClass("ActiveFormattingButtonClass"); | 1009 | $("#text-bold").removeClass("ActiveFormattingButtonClass"); |
@@ -1047,9 +1047,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -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 | $("#annotationTextModal").css("padding-right", "0px"); | 1053 | $("#annotationTextModal").css("padding-right", "0px"); |
1054 | if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { | 1054 | if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { |
1055 | $("#annotationTextModal").modal("toggle"); | 1055 | $("#annotationTextModal").modal("toggle"); |
@@ -1060,7 +1060,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1060,7 +1060,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1060 | 1060 | ||
1061 | $("#text_area").val(''); | 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 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); | 1070 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); |
1066 | 1071 | ||
@@ -1079,7 +1084,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1079,7 +1084,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1079 | $('.btnCursor').addClass('activebtncolor'); | 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,7 +1112,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1107 | ctx.clearRect(0, 0, 2277, 3248); | 1112 | ctx.clearRect(0, 0, 2277, 3248); |
1108 | $rootScope.clicked = true; | 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 | $rootScope.rectNumber = 0; | 1118 | $rootScope.rectNumber = 0; |
@@ -1189,7 +1194,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1189,7 +1194,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1189 | 1194 | ||
1190 | break; | 1195 | break; |
1191 | case "TextArea": | 1196 | case "TextArea": |
1192 | - | 1197 | + |
1193 | $rootScope.IsTextAlreadySave = false; | 1198 | $rootScope.IsTextAlreadySave = false; |
1194 | $("#text_area").val(''); | 1199 | $("#text_area").val(''); |
1195 | // Draw text | 1200 | // Draw text |
@@ -1208,13 +1213,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -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 | $rootScope.saveText = function () { | 1222 | $rootScope.saveText = function () { |
1223 | + debugger; | ||
1218 | document.getElementById('modelbackground').style.display = "none"; | 1224 | document.getElementById('modelbackground').style.display = "none"; |
1219 | // this part will work first time when save button will be clicked | 1225 | // this part will work first time when save button will be clicked |
1220 | if ($rootScope.IsTextAlreadySave == false) { | 1226 | if ($rootScope.IsTextAlreadySave == false) { |
@@ -1296,7 +1302,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1296,7 +1302,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1296 | }).drawLayers(); | 1302 | }).drawLayers(); |
1297 | }, | 1303 | }, |
1298 | dblclick: function (layer) { | 1304 | dblclick: function (layer) { |
1299 | - | 1305 | + |
1300 | $rootScope.isTextAreaClosedButtonActive = false; | 1306 | $rootScope.isTextAreaClosedButtonActive = false; |
1301 | $rootScope.IsTextAlreadySave = true; | 1307 | $rootScope.IsTextAlreadySave = true; |
1302 | 1308 | ||
@@ -1347,7 +1353,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1347,7 +1353,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1347 | $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration); | 1353 | $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration); |
1348 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor }); | 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 | // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); | 1366 | // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); |
1353 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | 1367 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); |
@@ -1456,7 +1470,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1456,7 +1470,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1456 | document.getElementById('modelbackground').style.display = "block"; | 1470 | document.getElementById('modelbackground').style.display = "block"; |
1457 | $("#annotationTextModal").modal("toggle"); | 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,7 +1503,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1488 | } | 1503 | } |
1489 | }); | 1504 | }); |
1490 | $("#text_area").val(''); | 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 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | 1517 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); |
1494 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); | 1518 | $("#text-italic").removeClass("ActiveFormattingButtonClass"); |
@@ -1582,8 +1606,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1582,8 +1606,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1582 | 1606 | ||
1583 | }, | 1607 | }, |
1584 | dblclick: function (layer) { | 1608 | dblclick: function (layer) { |
1585 | - | ||
1586 | - | 1609 | + |
1610 | + | ||
1587 | $rootScope.isTextAreaClosedButtonActive = false; | 1611 | $rootScope.isTextAreaClosedButtonActive = false; |
1588 | $rootScope.IsTextAlreadySave = true; | 1612 | $rootScope.IsTextAlreadySave = true; |
1589 | var _rectLayerOnSave = layer.name; | 1613 | var _rectLayerOnSave = layer.name; |
@@ -1605,9 +1629,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1605,9 +1629,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1605 | $("#text_area").css("font-family", _modifiedFontFamily); | 1629 | $("#text_area").css("font-family", _modifiedFontFamily); |
1606 | $("#text_area").css("text-decoration", _modifiedFontDecoration); | 1630 | $("#text_area").css("text-decoration", _modifiedFontDecoration); |
1607 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor }); | 1631 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor }); |
1632 | + | ||
1608 | // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" }); | 1633 | // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" }); |
1609 | // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | 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 | //adding text text decoration active class in text edit pop-up | 1645 | //adding text text decoration active class in text edit pop-up |
1612 | if (_modifiedFontDecoration == "underline") { | 1646 | if (_modifiedFontDecoration == "underline") { |
1613 | $("#text-underline").addClass("ActiveFormattingButtonClass"); | 1647 | $("#text-underline").addClass("ActiveFormattingButtonClass"); |
@@ -1694,16 +1728,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1694,16 +1728,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1694 | 1728 | ||
1695 | $rootScope.BindCanvasDrawingListners = function (event) { | 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 | $(document).keydown(function (event) { | 1743 | $(document).keydown(function (event) { |
@@ -1743,7 +1777,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1743,7 +1777,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1743 | $rootScope.closeModal = function () { | 1777 | $rootScope.closeModal = function () { |
1744 | 1778 | ||
1745 | document.getElementById('modelbackground').style.display = "none"; | 1779 | document.getElementById('modelbackground').style.display = "none"; |
1746 | - | 1780 | + |
1747 | //if ($rootScope.isTextAreaClosedButtonActive == true) { | 1781 | //if ($rootScope.isTextAreaClosedButtonActive == true) { |
1748 | // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); | 1782 | // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); |
1749 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | 1783 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
@@ -1831,15 +1865,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1831,15 +1865,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1831 | } | 1865 | } |
1832 | 1866 | ||
1833 | $rootScope.disableAnnotationTB = false; | 1867 | $rootScope.disableAnnotationTB = false; |
1834 | - $rootScope.disableAnnotationTBFn = function() | ||
1835 | - { | 1868 | + $rootScope.disableAnnotationTBFn = function () { |
1836 | $rootScope.disableAnnotationTB = true; | 1869 | $rootScope.disableAnnotationTB = true; |
1837 | } | 1870 | } |
1838 | 1871 | ||
1839 | //list manager function | 1872 | //list manager function |
1840 | 1873 | ||
1841 | //list manager function | 1874 | //list manager function |
1842 | - | 1875 | + |
1843 | $rootScope.disableAnnotationtoolOnListManager = false; | 1876 | $rootScope.disableAnnotationtoolOnListManager = false; |
1844 | $rootScope.ShowListManager = function () { | 1877 | $rootScope.ShowListManager = function () { |
1845 | console.log('ShowListManager') | 1878 | console.log('ShowListManager') |
@@ -1864,7 +1897,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1864,7 +1897,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1864 | console.log('close') | 1897 | console.log('close') |
1865 | $rootScope.disableAnnotationtoolOnListManager = false; | 1898 | $rootScope.disableAnnotationtoolOnListManager = false; |
1866 | if ($rootScope.MenuModuleName == "DA") { | 1899 | if ($rootScope.MenuModuleName == "DA") { |
1867 | - | 1900 | + |
1868 | if ($rootScope.disableAnnotationtoolOnListManager == false) { | 1901 | if ($rootScope.disableAnnotationtoolOnListManager == false) { |
1869 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); | 1902 | $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); |
1870 | $('#slider-range-min-2').slider('enable'); | 1903 | $('#slider-range-min-2').slider('enable'); |
@@ -2038,8 +2071,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2038,8 +2071,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2038 | if (len > 0) { | 2071 | if (len > 0) { |
2039 | $rootScope.reloadChildController(); | 2072 | $rootScope.reloadChildController(); |
2040 | } | 2073 | } |
2041 | - else | ||
2042 | - { | 2074 | + else { |
2043 | $('#modal-settings').modal('hide'); | 2075 | $('#modal-settings').modal('hide'); |
2044 | } | 2076 | } |
2045 | 2077 |