Commit d57e03c5111d0a0e8069cf10efd202b95613e82d
1 parent
4304b2f6
DA > Annotation Toolbar > Text write in the text box display out from the box wh…
…en user reverse draw the text box.
Showing
1 changed file
with
13 additions
and
13 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -1178,8 +1178,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -1178,8 +1178,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
1178 | strokeWidth: shapestyleborderWidth, | 1178 | strokeWidth: shapestyleborderWidth, |
1179 | fromCenter: false, | 1179 | fromCenter: false, |
1180 | x: offsetX1, y: offsetY1, | 1180 | x: offsetX1, y: offsetY1, |
1181 | - width: (x - offsetX1), | ||
1182 | - height: (y - offsetY1), | 1181 | + width: Math.abs(x - offsetX1), |
1182 | + height: Math.abs(y - offsetY1), | ||
1183 | 1183 | ||
1184 | resizeFromCenter: false, | 1184 | resizeFromCenter: false, |
1185 | 1185 | ||
@@ -1275,7 +1275,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -1275,7 +1275,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
1275 | fillStyle: shapestyleFillColor, | 1275 | fillStyle: shapestyleFillColor, |
1276 | fromCenter: false, | 1276 | fromCenter: false, |
1277 | x: (offsetX1), y: (offsetY1), | 1277 | x: (offsetX1), y: (offsetY1), |
1278 | - width: (x - offsetX1), height: (y - offsetY1), | 1278 | + width: Math.abs(x - offsetX1), height: Math.abs(y - offsetY1), |
1279 | // Place a handle at each side and each corner | 1279 | // Place a handle at each side and each corner |
1280 | resizeFromCenter: false, | 1280 | resizeFromCenter: false, |
1281 | handlePlacement: 'both', | 1281 | handlePlacement: 'both', |
@@ -1604,8 +1604,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -1604,8 +1604,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
1604 | strokeWidth: $rootScope.shapestyleborderWidth, | 1604 | strokeWidth: $rootScope.shapestyleborderWidth, |
1605 | fillStyle: $rootScope.shapestyleFillColor, | 1605 | fillStyle: $rootScope.shapestyleFillColor, |
1606 | x: $rootScope.offsetX1, y: $rootScope.offsetY1, | 1606 | x: $rootScope.offsetX1, y: $rootScope.offsetY1, |
1607 | - width: ($rootScope.x - $rootScope.offsetX1), | ||
1608 | - height: ($rootScope.y - $rootScope.offsetY1), | 1607 | + width: Math.abs($rootScope.x - $rootScope.offsetX1), |
1608 | + height: Math.abs($rootScope.y - $rootScope.offsetY1), | ||
1609 | resizeFromCenter: false, | 1609 | resizeFromCenter: false, |
1610 | add: function (layer) { | 1610 | add: function (layer) { |
1611 | 1611 | ||
@@ -2005,8 +2005,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -2005,8 +2005,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
2005 | fillStyle: $rootScope.selectedBGColorForTextArea, | 2005 | fillStyle: $rootScope.selectedBGColorForTextArea, |
2006 | fromCenter: false, | 2006 | fromCenter: false, |
2007 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 2007 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
2008 | - width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | ||
2009 | - height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | 2008 | + width: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width), |
2009 | + height: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height), | ||
2010 | resizeFromCenter: false, | 2010 | resizeFromCenter: false, |
2011 | add: function (layer) { | 2011 | add: function (layer) { |
2012 | var TextAreaLayerName = layer.name; | 2012 | var TextAreaLayerName = layer.name; |
@@ -2269,8 +2269,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -2269,8 +2269,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
2269 | strokeWidth: 0, | 2269 | strokeWidth: 0, |
2270 | text: $rootScope.textArea, | 2270 | text: $rootScope.textArea, |
2271 | x: ($rootScope.rectDimension[$rootScope.rectDimension.length - 1].x), y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 2271 | x: ($rootScope.rectDimension[$rootScope.rectDimension.length - 1].x), y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
2272 | - maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | ||
2273 | - maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | 2272 | + maxWidth: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width), |
2273 | + maxHeight: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height), | ||
2274 | add: function (layer) { | 2274 | add: function (layer) { |
2275 | // console.log(layer.x + " " + layer.y); | 2275 | // console.log(layer.x + " " + layer.y); |
2276 | $rootScope.textXAxisAftrResize = layer.x; | 2276 | $rootScope.textXAxisAftrResize = layer.x; |
@@ -2345,8 +2345,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -2345,8 +2345,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
2345 | strokeWidth: $rootScope.shapestyleborderWidth, | 2345 | strokeWidth: $rootScope.shapestyleborderWidth, |
2346 | fillStyle: $rootScope.selectedBGColorForTextArea, | 2346 | fillStyle: $rootScope.selectedBGColorForTextArea, |
2347 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 2347 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
2348 | - width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | ||
2349 | - height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | 2348 | + width: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width), |
2349 | + height: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height), | ||
2350 | resizeFromCenter: false, | 2350 | resizeFromCenter: false, |
2351 | add: function (layer) { | 2351 | add: function (layer) { |
2352 | var TextAreaLayerName = layer.name; | 2352 | var TextAreaLayerName = layer.name; |
@@ -2563,8 +2563,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -2563,8 +2563,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
2563 | fromCenter: false, | 2563 | fromCenter: false, |
2564 | text: _modifiedText, | 2564 | text: _modifiedText, |
2565 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 2565 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
2566 | - maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | ||
2567 | - maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | 2566 | + maxWidth: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].width), |
2567 | + maxHeight: Math.abs($rootScope.rectDimension[$rootScope.rectDimension.length - 1].height), | ||
2568 | add: function (layer) { | 2568 | add: function (layer) { |
2569 | // console.log(layer.x + " " + layer.y); | 2569 | // console.log(layer.x + " " + layer.y); |
2570 | $rootScope.editTextXAxisAftrResize = layer.x; | 2570 | $rootScope.editTextXAxisAftrResize = layer.x; |