Commit b4e8bf4e44f80a70f047fb6d6ba745ca59b27004
commit after AnnotationToolBar_latest merge. this branch is having issue in color option OK button.
Showing
3 changed files
with
74 additions
and
28 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2583,7 +2583,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2583 | 2583 | else { |
2584 | 2584 | console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) |
2585 | 2585 | } |
2586 | - | |
2586 | + if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){ | |
2587 | 2587 | if ($scope.longestAnnotation.length <= 10) { |
2588 | 2588 | |
2589 | 2589 | |
... | ... | @@ -2642,6 +2642,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2642 | 2642 | |
2643 | 2643 | |
2644 | 2644 | } |
2645 | + | |
2646 | + } | |
2645 | 2647 | var Globe = []; |
2646 | 2648 | Globe.push({ currentX: x, currentY: y }); |
2647 | 2649 | |
... | ... | @@ -5681,8 +5683,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5681 | 5683 | layer: true, |
5682 | 5684 | type: 'line', |
5683 | 5685 | draggable: true, |
5684 | - strokeStyle: 'black', | |
5685 | - strokeWidth: 2, | |
5686 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5687 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5686 | 5688 | rounded: true, |
5687 | 5689 | x1: $scope.offsetX1, y1: $scope.offsetY1, |
5688 | 5690 | x2: $scope.x, y2: $scope.y, |
... | ... | @@ -5743,12 +5745,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5743 | 5745 | $('#canvas').addLayer({ |
5744 | 5746 | layer: true, |
5745 | 5747 | name: 'Rect_' + $rootScope.resetRect, |
5746 | - fillStyle: '#fff', | |
5748 | + fillStyle: $rootScope.shapestyleFillColor, | |
5747 | 5749 | type: 'rectangle', |
5748 | 5750 | draggable: true, |
5749 | - strokeStyle: 'black', | |
5751 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5750 | 5752 | opacity: $rootScope.shapestyleOpacity, |
5751 | - strokeWidth: 2, | |
5753 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5752 | 5754 | x: $scope.offsetX1, y: $scope.offsetY1, |
5753 | 5755 | width: $scope.x - $scope.offsetX1, |
5754 | 5756 | height: $scope.y - $scope.offsetY1, |
... | ... | @@ -5812,7 +5814,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5812 | 5814 | break; |
5813 | 5815 | |
5814 | 5816 | case "Circle": |
5815 | - | |
5817 | + // alert($rootScope.shapestyleFillColor); | |
5816 | 5818 | $rootScope.resetCircle = $rootScope.ObjectIndex++; |
5817 | 5819 | $('#canvas').addLayer({ |
5818 | 5820 | layer: true, |
... | ... | @@ -5820,9 +5822,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5820 | 5822 | type: 'ellipse', |
5821 | 5823 | opacity: $rootScope.shapestyleOpacity, |
5822 | 5824 | draggable: true, |
5823 | - strokeStyle: '#000', | |
5824 | - strokeWidth: 2, | |
5825 | - fillStyle: '#FFF', | |
5825 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5826 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5827 | + fillStyle: $rootScope.shapestyleFillColor, | |
5826 | 5828 | x: $scope.offsetX1, y: $scope.offsetY1, |
5827 | 5829 | width: ($scope.x - $scope.offsetX1) * 2, height: ($scope.y - $scope.offsetY1) * 2, |
5828 | 5830 | // Place a handle at each side and each corner |
... | ... | @@ -5886,8 +5888,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5886 | 5888 | layer: true, |
5887 | 5889 | name: 'Arrow_' + $rootScope.resetArrow, |
5888 | 5890 | draggable: true, |
5889 | - strokeStyle: '#000', | |
5890 | - strokeWidth: 2, | |
5891 | + strokeStyle: $rootScope.shapestyleborderColor, | |
5892 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
5891 | 5893 | rounded: true, |
5892 | 5894 | startArrow: true, |
5893 | 5895 | arrowRadius: 7, |
... | ... | @@ -6089,8 +6091,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6089 | 6091 | name: "TextRect_" + $rootScope.resetTextRect, |
6090 | 6092 | dragGroups: ['shapes'], |
6091 | 6093 | opacity: $rootScope.shapestyleOpacity, |
6092 | - strokeStyle: 'black', | |
6093 | - strokeWidth: 2, | |
6094 | + strokeStyle: $rootScope.shapestyleborderColor, | |
6095 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
6096 | + fillStyle: $rootScope.shapestyleFillColor, | |
6094 | 6097 | x: $scope.offsetX1, y: $scope.offsetY1, |
6095 | 6098 | width: $scope.x - $scope.offsetX1, |
6096 | 6099 | height: $scope.y - $scope.offsetY1, |
... | ... | @@ -6179,7 +6182,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6179 | 6182 | $rootScope.textArea = $("#text_area").val(); |
6180 | 6183 | $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); |
6181 | 6184 | $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
6182 | - | |
6185 | + // alert($rootScope.fontColor); | |
6183 | 6186 | $('#canvas').drawText({ |
6184 | 6187 | layer: true, |
6185 | 6188 | draggable: true, |
... | ... | @@ -6215,8 +6218,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6215 | 6218 | groups: ['TextArea_' + $rootScope.resetText], |
6216 | 6219 | dragGroups: ['TextArea_' + $rootScope.resetText], |
6217 | 6220 | opacity: $rootScope.shapestyleOpacity, |
6218 | - strokeStyle: 'black', | |
6219 | - strokeWidth: 2, | |
6221 | + // strokeStyle: 'black', | |
6222 | + // strokeWidth: 2, | |
6223 | + strokeStyle: $rootScope.shapestyleborderColor, | |
6224 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
6225 | + // fillStyle: $rootScope.shapestyleFillColor, | |
6220 | 6226 | x: $scope.offsetX1, y: $scope.offsetY1, |
6221 | 6227 | width: $scope.x - $scope.offsetX1, |
6222 | 6228 | height: $scope.y - $scope.offsetY1, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -72,7 +72,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
72 | 72 | if (alreadyOpenThisView != null) { |
73 | 73 | for (var i = 0; i < $rootScope.openViews.length; i++) { |
74 | 74 | k++; |
75 | - if ($rootScope.openViews[i].body - views == title) { | |
75 | + if ($rootScope.openViews[i].body-views == title) { | |
76 | 76 | $rootScope.openViews.splice((k - 1), 1); |
77 | 77 | |
78 | 78 | $rootScope.openViews.push( |
... | ... | @@ -255,9 +255,28 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
255 | 255 | |
256 | 256 | //opacity code |
257 | 257 | $rootScope.shapestyleOpacity = 1; |
258 | + $rootScope.shapestyleFillColor = "#fff"; | |
259 | + $rootScope.shapestyleFillBorderColor = "black"; | |
260 | + $rootScope.shapestyleborderWidth=2; | |
261 | + | |
258 | 262 | $rootScope.shapestyle = function (id) { |
259 | 263 | |
260 | 264 | $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); |
265 | + $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color'); | |
266 | + $rootScope.shapestyleFillBorderColor = $("#" + id).parent().css('border'); | |
267 | + var a = $rootScope.shapestyleFillBorderColor; | |
268 | + var b = a.split("px"); | |
269 | + // alert(b); | |
270 | + $rootScope.shapestyleborderWidth = b[0]; | |
271 | + | |
272 | + // alert(b[0]); | |
273 | + //alert(b[1]); | |
274 | + var c = b[1].split("solid"); | |
275 | + // alert(c[1]); | |
276 | + $rootScope.shapestyleborderColor = c[1]; | |
277 | + | |
278 | + | |
279 | + // alert($rootScope.shapestyleFillColor); | |
261 | 280 | $('#editshapestyle').modal('hide'); |
262 | 281 | } |
263 | 282 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -437,7 +437,6 @@ |
437 | 437 | <div class="clearfix"></div> |
438 | 438 | </div> |
439 | 439 | |
440 | - | |
441 | 440 | </div> |
442 | 441 | |
443 | 442 | |
... | ... | @@ -674,7 +673,7 @@ |
674 | 673 | <div class="col-sm-12"> |
675 | 674 | <div class="checkbox no-margin"> |
676 | 675 | <label> |
677 | - <input type="checkbox" checked> Fill Option | |
676 | + <input id="fill-option" type="checkbox" checked> Fill Option | |
678 | 677 | </label> |
679 | 678 | </div> |
680 | 679 | </div> |
... | ... | @@ -693,7 +692,7 @@ |
693 | 692 | |
694 | 693 | <div class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;"> |
695 | 694 | <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span> |
696 | - <input type="text" class="form-control demo2" data-control="saturation" style="display:none;" value="#0088cc"> | |
695 | + <input type="text" class="form-control outerBackgroundColor" data-control="saturation" style="display:none;" value="#0088cc"> | |
697 | 696 | </div> |
698 | 697 | |
699 | 698 | |
... | ... | @@ -733,7 +732,7 @@ |
733 | 732 | <div class="col-sm-12"> |
734 | 733 | <div class="checkbox no-margin"> |
735 | 734 | <label> |
736 | - <input type="checkbox" checked> Outline Option | |
735 | + <input id="Outline-Option" type="checkbox" checked> Outline Option | |
737 | 736 | </label> |
738 | 737 | </div> |
739 | 738 | </div> |
... | ... | @@ -745,7 +744,7 @@ |
745 | 744 | |
746 | 745 | <div class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;"> |
747 | 746 | |
748 | - <input type="text" class="form-control demo1" data-control="saturation" style="display:none;" value="#0088cc"> | |
747 | + <input type="text" class="form-control borderColorCanvasPreview" data-control="saturation" style="display:none;" value="#0088cc"> | |
749 | 748 | </div> |
750 | 749 | |
751 | 750 | |
... | ... | @@ -756,10 +755,10 @@ |
756 | 755 | <div class="col-sm-6"> |
757 | 756 | <div class="form-horizontal"> |
758 | 757 | <div class="form-group"> |
759 | - <label for="inputPassword" class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label> | |
758 | + <label class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label> | |
760 | 759 | <div class="col-sm-9 marginTop5"> |
761 | - <select class="form-control input-sm"> | |
762 | - <option value="1" selected>1</option> | |
760 | + <select id="borderWidthCanvasElement" class="form-control input-sm"> | |
761 | + <option value="1">1</option> | |
763 | 762 | <option value="2">2</option> |
764 | 763 | <option value="3">3</option> |
765 | 764 | <option value="4">4</option> |
... | ... | @@ -1009,8 +1008,21 @@ |
1009 | 1008 | |
1010 | 1009 | <script> |
1011 | 1010 | $(document).ready(function () { |
1011 | + var borderWidth = 1; | |
1012 | + var borderColor; | |
1013 | + $("#borderWidthCanvasElement").change(function () { | |
1014 | + | |
1015 | + borderWidth = $(this).val(); | |
1016 | + | |
1017 | + if (borderColor != null) { | |
1018 | + $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); | |
1019 | + } else { | |
1020 | + $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid"); | |
1021 | + } | |
1022 | + }); | |
1023 | + | |
1012 | 1024 | |
1013 | - $('.demo1').each(function () { | |
1025 | + $('.borderColorCanvasPreview').each(function () { | |
1014 | 1026 | |
1015 | 1027 | $(this).minicolors({ |
1016 | 1028 | control: $(this).attr('data-control') || 'hue', |
... | ... | @@ -1027,6 +1039,13 @@ |
1027 | 1039 | if (opacity) value += ', ' + opacity; |
1028 | 1040 | if (typeof console === 'object') { |
1029 | 1041 | console.log(value); |
1042 | + console.log(borderWidth); | |
1043 | + // alert(borderWidth); | |
1044 | + | |
1045 | + borderColor = value; | |
1046 | + $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + value); | |
1047 | + | |
1048 | + // alert($("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + value)); | |
1030 | 1049 | } |
1031 | 1050 | }, |
1032 | 1051 | theme: 'bootstrap' |
... | ... | @@ -1036,7 +1055,7 @@ |
1036 | 1055 | |
1037 | 1056 | |
1038 | 1057 | |
1039 | - $('.demo2').each(function () { | |
1058 | + $('.outerBackgroundColor').each(function () { | |
1040 | 1059 | |
1041 | 1060 | $(this).minicolors({ |
1042 | 1061 | control: $(this).attr('data-control') || 'hue', |
... | ... | @@ -1053,6 +1072,8 @@ |
1053 | 1072 | if (opacity) value += ', ' + opacity; |
1054 | 1073 | if (typeof console === 'object') { |
1055 | 1074 | console.log(value); |
1075 | + $("#imgOpacity").parent().css("background-color", value); | |
1076 | + | |
1056 | 1077 | } |
1057 | 1078 | }, |
1058 | 1079 | theme: 'bootstrap' | ... | ... |