Commit cf84a6722499c8c8719c9976e154a4ead8564cc3
Merge branch 'TBLateralArmAnno' into Develop
Showing
1 changed file
with
43 additions
and
13 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -4388,20 +4388,50 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4388 | 4388 | var isMirror; |
4389 | 4389 | var width; |
4390 | 4390 | var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; |
4391 | - $.each(BodyRegionDictionary, function (index, value) { | |
4392 | - | |
4393 | - var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); | |
4394 | - var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); | |
4395 | - if (actulalX <= bodyRegionRight && value.X <= actulalX && actualY <= bodyRegionBottom && value.Y <= actualY) { | |
4396 | - | |
4397 | - clickedBodyRegion = value.bodyRegionId; | |
4398 | - x = value.X; | |
4399 | - y = value.Y; | |
4400 | - width = value.Width; | |
4401 | - isMirror = value.IsMirror; | |
4402 | - return false; | |
4391 | + if ($rootScope.viewOrientationId == 5) { | |
4392 | + | |
4393 | + var clickedBodyRegionData = new jinqJs() | |
4394 | + .from(BodyRegionDictionary) | |
4395 | + .where('bodyRegionId == 6') | |
4396 | + .select(); | |
4397 | + | |
4398 | + | |
4399 | + // clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId; | |
4400 | + x = clickedBodyRegionData[0].X; | |
4401 | + y = clickedBodyRegionData[0].Y; | |
4402 | + width = clickedBodyRegionData[0].Width; | |
4403 | + var height = clickedBodyRegionData[0].Height; | |
4404 | + isMirror = clickedBodyRegionData[0].IsMirror; | |
4405 | + var bodyRegionRight = parseInt(x) + parseInt(width); | |
4406 | + var bodyRegionBottom = parseInt(y) + parseInt(height); | |
4407 | + if (actulalX <= bodyRegionRight && x <= actulalX && actualY <= bodyRegionBottom && y <= actualY) { | |
4408 | + | |
4409 | + clickedBodyRegion = clickedBodyRegionData[0].bodyRegionId; | |
4410 | + x = clickedBodyRegionData[0].X; | |
4411 | + y = clickedBodyRegionData[0].Y; | |
4412 | + width = clickedBodyRegionData[0].Width; | |
4413 | + var height = clickedBodyRegionData[0].Height; | |
4414 | + isMirror = clickedBodyRegionData[0].IsMirror; | |
4415 | + } | |
4416 | + | |
4417 | + } | |
4418 | + else { | |
4419 | + $.each(BodyRegionDictionary, function (index, value) { | |
4420 | + | |
4421 | + var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); | |
4422 | + var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); | |
4423 | + if (actulalX <= bodyRegionRight && value.X <= actulalX && actualY <= bodyRegionBottom && value.Y <= actualY) { | |
4424 | + | |
4425 | + clickedBodyRegion = value.bodyRegionId; | |
4426 | + x = value.X; | |
4427 | + y = value.Y; | |
4428 | + width = value.Width; | |
4429 | + isMirror = value.IsMirror; | |
4430 | + return false; | |
4431 | + } | |
4432 | + }) | |
4403 | 4433 | } |
4404 | - }) | |
4434 | + | |
4405 | 4435 | |
4406 | 4436 | if (isMirror == "Yes") { |
4407 | 4437 | ... | ... |