diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index c2ff1c1..27cbf93 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -1178,8 +1178,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
strokeWidth: shapestyleborderWidth,
fromCenter: false,
x: offsetX1, y: offsetY1,
- width: (x - offsetX1),
- height: (y - offsetY1),
+ width: Math.abs(x - offsetX1),
+ height: Math.abs(y - offsetY1),
resizeFromCenter: false,
@@ -1275,7 +1275,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
fillStyle: shapestyleFillColor,
fromCenter: false,
x: (offsetX1), y: (offsetY1),
- width: (x - offsetX1), height: (y - offsetY1),
+ //added abs
+ width: Math.abs(x - offsetX1), height: Math.abs(y - offsetY1),
// Place a handle at each side and each corner
resizeFromCenter: false,
handlePlacement: 'both',
@@ -1604,8 +1605,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
strokeWidth: $rootScope.shapestyleborderWidth,
fillStyle: $rootScope.shapestyleFillColor,
x: $rootScope.offsetX1, y: $rootScope.offsetY1,
- width: ($rootScope.x - $rootScope.offsetX1),
- height: ($rootScope.y - $rootScope.offsetY1),
+ width: Math.abs($rootScope.x - $rootScope.offsetX1),
+ height: Math.abs($rootScope.y - $rootScope.offsetY1),
resizeFromCenter: false,
add: function (layer) {
@@ -2005,8 +2006,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
fillStyle: $rootScope.selectedBGColorForTextArea,
fromCenter: false,
x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
- width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
- height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
+ width: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width),
+ height: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height),
resizeFromCenter: false,
add: function (layer) {
var TextAreaLayerName = layer.name;
@@ -2269,8 +2270,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
strokeWidth: 0,
text: $rootScope.textArea,
x: ($rootScope.rectDimension[$rootScope.rectDimension.length - 1].x), y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
- maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
- maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
+ maxWidth: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width),
+ maxHeight: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height),
add: function (layer) {
// console.log(layer.x + " " + layer.y);
$rootScope.textXAxisAftrResize = layer.x;
@@ -2345,8 +2346,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
strokeWidth: $rootScope.shapestyleborderWidth,
fillStyle: $rootScope.selectedBGColorForTextArea,
x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
- width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
- height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
+ width: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width),
+ height: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height),
resizeFromCenter: false,
add: function (layer) {
var TextAreaLayerName = layer.name;
@@ -2563,8 +2564,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
fromCenter: false,
text: _modifiedText,
x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y,
- maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width,
- maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
+ maxWidth: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width),
+ maxHeight: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height),
add: function (layer) {
// console.log(layer.x + " " + layer.y);
$rootScope.editTextXAxisAftrResize = layer.x;