diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index fd92d78..011cea5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2583,7 +2583,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else { console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) } - + if($scope.longestAnnotation!=null || $scope.longestAnnotation!=undefined){ if ($scope.longestAnnotation.length <= 10) { @@ -2642,6 +2642,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } + + } var Globe = []; Globe.push({ currentX: x, currentY: y }); @@ -5681,8 +5683,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo layer: true, type: 'line', draggable: true, - strokeStyle: 'black', - strokeWidth: 2, + strokeStyle: $rootScope.shapestyleborderColor, + strokeWidth: $rootScope.shapestyleborderWidth, rounded: true, x1: $scope.offsetX1, y1: $scope.offsetY1, x2: $scope.x, y2: $scope.y, @@ -5743,12 +5745,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#canvas').addLayer({ layer: true, name: 'Rect_' + $rootScope.resetRect, - fillStyle: '#fff', + fillStyle: $rootScope.shapestyleFillColor, type: 'rectangle', draggable: true, - strokeStyle: 'black', + strokeStyle: $rootScope.shapestyleborderColor, opacity: $rootScope.shapestyleOpacity, - strokeWidth: 2, + strokeWidth: $rootScope.shapestyleborderWidth, x: $scope.offsetX1, y: $scope.offsetY1, width: $scope.x - $scope.offsetX1, height: $scope.y - $scope.offsetY1, @@ -5812,7 +5814,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo break; case "Circle": - + // alert($rootScope.shapestyleFillColor); $rootScope.resetCircle = $rootScope.ObjectIndex++; $('#canvas').addLayer({ layer: true, @@ -5820,9 +5822,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo type: 'ellipse', opacity: $rootScope.shapestyleOpacity, draggable: true, - strokeStyle: '#000', - strokeWidth: 2, - fillStyle: '#FFF', + strokeStyle: $rootScope.shapestyleborderColor, + strokeWidth: $rootScope.shapestyleborderWidth, + fillStyle: $rootScope.shapestyleFillColor, x: $scope.offsetX1, y: $scope.offsetY1, width: ($scope.x - $scope.offsetX1) * 2, height: ($scope.y - $scope.offsetY1) * 2, // Place a handle at each side and each corner @@ -5886,8 +5888,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo layer: true, name: 'Arrow_' + $rootScope.resetArrow, draggable: true, - strokeStyle: '#000', - strokeWidth: 2, + strokeStyle: $rootScope.shapestyleborderColor, + strokeWidth: $rootScope.shapestyleborderWidth, rounded: true, startArrow: true, arrowRadius: 7, @@ -6089,8 +6091,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo name: "TextRect_" + $rootScope.resetTextRect, dragGroups: ['shapes'], opacity: $rootScope.shapestyleOpacity, - strokeStyle: 'black', - strokeWidth: 2, + strokeStyle: $rootScope.shapestyleborderColor, + strokeWidth: $rootScope.shapestyleborderWidth, + fillStyle: $rootScope.shapestyleFillColor, x: $scope.offsetX1, y: $scope.offsetY1, width: $scope.x - $scope.offsetX1, height: $scope.y - $scope.offsetY1, @@ -6179,7 +6182,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.textArea = $("#text_area").val(); $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); - + // alert($rootScope.fontColor); $('#canvas').drawText({ layer: true, draggable: true, @@ -6215,8 +6218,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo groups: ['TextArea_' + $rootScope.resetText], dragGroups: ['TextArea_' + $rootScope.resetText], opacity: $rootScope.shapestyleOpacity, - strokeStyle: 'black', - strokeWidth: 2, + // strokeStyle: 'black', + // strokeWidth: 2, + strokeStyle: $rootScope.shapestyleborderColor, + strokeWidth: $rootScope.shapestyleborderWidth, + // fillStyle: $rootScope.shapestyleFillColor, x: $scope.offsetX1, y: $scope.offsetY1, width: $scope.x - $scope.offsetX1, height: $scope.y - $scope.offsetY1, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 8e9f8d7..f5752e5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -72,7 +72,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", if (alreadyOpenThisView != null) { for (var i = 0; i < $rootScope.openViews.length; i++) { k++; - if ($rootScope.openViews[i].body - views == title) { + if ($rootScope.openViews[i].body-views == title) { $rootScope.openViews.splice((k - 1), 1); $rootScope.openViews.push( @@ -255,9 +255,28 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", //opacity code $rootScope.shapestyleOpacity = 1; + $rootScope.shapestyleFillColor = "#fff"; + $rootScope.shapestyleFillBorderColor = "black"; + $rootScope.shapestyleborderWidth=2; + $rootScope.shapestyle = function (id) { $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); + $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color'); + $rootScope.shapestyleFillBorderColor = $("#" + id).parent().css('border'); + var a = $rootScope.shapestyleFillBorderColor; + var b = a.split("px"); + // alert(b); + $rootScope.shapestyleborderWidth = b[0]; + + // alert(b[0]); + //alert(b[1]); + var c = b[1].split("solid"); + // alert(c[1]); + $rootScope.shapestyleborderColor = c[1]; + + + // alert($rootScope.shapestyleFillColor); $('#editshapestyle').modal('hide'); } diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index b029f5b..790a659 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -437,7 +437,6 @@
- @@ -674,7 +673,7 @@
@@ -693,7 +692,7 @@
Color - +
@@ -733,7 +732,7 @@
@@ -745,7 +744,7 @@
- +
@@ -756,10 +755,10 @@
- +
- + @@ -1009,8 +1008,21 @@