Commit 3b63ade08dec868e65cfe1aeb4fa17264a09abeb
1 parent
8235afc2
modesty settings implemented in DA but annotation is not working in this.
Showing
1 changed file
with
53 additions
and
28 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -405,7 +405,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
405 | 405 | $scope.viewOrientationId = 6; |
406 | 406 | } |
407 | 407 | |
408 | - debugger; | |
408 | + // debugger; | |
409 | 409 | var bgArtJsonPath = ''; |
410 | 410 | |
411 | 411 | // if ($scope.voId == 9 || $scope.voId == 11) { |
... | ... | @@ -432,7 +432,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
432 | 432 | //calculate coordinates for body region images |
433 | 433 | $scope.CalculateImageCordinates = function (viewOrientationId) { |
434 | 434 | |
435 | - debugger; | |
435 | + // debugger; | |
436 | 436 | |
437 | 437 | //set height of canvas div and left tool bar as per window size |
438 | 438 | $scope.BodyRegionCordinatesData = []; // create an empty array |
... | ... | @@ -516,7 +516,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
516 | 516 | else { |
517 | 517 | //Draw body region which don't have mirror image |
518 | 518 | |
519 | - debugger; | |
519 | + //debugger; | |
520 | 520 | |
521 | 521 | |
522 | 522 | |
... | ... | @@ -549,8 +549,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
549 | 549 | $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), maskSRC, value._BodyRegionId, 'Y'); |
550 | 550 | |
551 | 551 | |
552 | - | |
553 | - if ((DA[0].modesty == 'Y')) { | |
552 | + //draw figLeaf for modesty | |
553 | + | |
554 | 554 | $scope.figLaefImageName; |
555 | 555 | $scope.figLaefX; |
556 | 556 | $scope.figLaefY; |
... | ... | @@ -576,29 +576,49 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
576 | 576 | .from(dtlOfBr) |
577 | 577 | .where('_Gender == ' + gender) |
578 | 578 | .select(); |
579 | - | |
580 | - var filtereddata = new jinqJs() | |
579 | + //multiple conditions are not working in where clause of JinQ so need multiple filtered variables | |
580 | + var filteredLayerdata = new jinqJs() | |
581 | 581 | .from(dtlOfGender) |
582 | - .where('_lns <= ' + $scope.layerNumber + ' && _lne >= ' + $scope.layerNumber + ' && _isfr == Y') | |
582 | + .where('_lns <= ' + $scope.layerNumber) | |
583 | 583 | .select(); |
584 | 584 | |
585 | - $scope.figLaefImageName = filtereddata[0]._ImageId; | |
586 | - $scope.figLaefX = filtereddata[0]._X; | |
587 | - $scope.figLaefY = filtereddata[0]._Y; | |
588 | - | |
589 | - var src = "content/images/DA/BodyViews/" + $scope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName; | |
590 | - var leafImg = new Image(); | |
591 | - leafImg.style.position = 'absolute'; | |
592 | - leafImg.style.left = '780px'; | |
593 | - leafImg.style.top = '1200px'; | |
594 | - | |
595 | - leafImg.src = src; | |
596 | - | |
597 | - document.getElementById('canvasDiv').appendChild(leafImg); | |
598 | - | |
599 | - var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); | |
600 | - var rectangle1 = scaleRectangle($scope.figLaefX, $scope.figLaefY, leafImg.height, leafImg.width, value._MirrorValue); | |
601 | - var abc; | |
585 | + var filteredlnedata = new jinqJs() | |
586 | + .from(filteredLayerdata) | |
587 | + .where('_lne >= ' + $scope.layerNumber) | |
588 | + .select(); | |
589 | + | |
590 | + var filtereddata= new jinqJs() | |
591 | + .from(filteredlnedata) | |
592 | + .where(' _isfr == Y') | |
593 | + .select(); | |
594 | + | |
595 | + if (filtereddata.length > 0) { | |
596 | + $scope.figLaefImageName = filtereddata[0]._ImageId; | |
597 | + $scope.figLaefX = filtereddata[0]._X; | |
598 | + $scope.figLaefY = filtereddata[0]._Y; | |
599 | + | |
600 | + var src = "content/images/DA/BodyViews/" + $scope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName; | |
601 | + | |
602 | + var leafImg = new Image(); | |
603 | + leafImg.id = 'modestyImg' | |
604 | + leafImg.src = src; | |
605 | + | |
606 | + var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue); | |
607 | + var rectangle1 = scaleRectangle($scope.figLaefX, $scope.figLaefY, leafImg.height, leafImg.width, value._MirrorValue); | |
608 | + var abc; | |
609 | + //if ($scope.viewOrientationId == 5) { | |
610 | + // leafImg.style.position = 'absolute'; | |
611 | + // leafImg.style.left = '800px'; //+parseInt(rectangle1.scaledX) + 'px';//'780px'; | |
612 | + // leafImg.style.top = '800px'; | |
613 | + //} | |
614 | + //else { | |
615 | + leafImg.style.position = 'absolute'; | |
616 | + leafImg.style.left = parseInt(rectangle.scaledX) + 'px'; //+parseInt(rectangle1.scaledX) + 'px';//'780px'; | |
617 | + leafImg.style.top = parseInt(rectangle.scaledY) + 'px';// +parseInt(rectangle1.scaledY) + 'px';//'1200px'; | |
618 | + leafImg.style.visibility = 'hidden'; | |
619 | + | |
620 | + document.getElementById('canvasDiv').appendChild(leafImg); | |
621 | + } | |
602 | 622 | //$scope.DrawImage(Math.round(rectangle1.scaledHeight), Math.round(rectangle1.scaledWidth), Math.round(parseInt(rectangle.scaledX) + parseInt(rectangle1.scaledX)), Math.round(parseInt(rectangle.scaledY) + parseInt(rectangle1.scaledY)), src, value._BodyRegionId + '_fig', 'N'); |
603 | 623 | // |
604 | 624 | // var xlData:XMLList = _xmlBackgroundArtViewList[XMLConst.ITEM].((@voId == String(iViewOrientationId)) && (@gr == strGenderId) |
... | ... | @@ -610,12 +630,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
610 | 630 | // } |
611 | 631 | // |
612 | 632 | } |
613 | - } | |
633 | + | |
614 | 634 | } |
615 | 635 | |
616 | 636 | |
617 | 637 | }); |
618 | - | |
638 | + debugger; | |
639 | + if ((DA[0].modesty == 'Y')) { | |
640 | + if ($('#modestyImg') != null) { | |
641 | + $('#modestyImg').css('visibility', 'visible'); | |
642 | + } | |
643 | + } | |
619 | 644 | //set scrollbars on canvas and hide loading label |
620 | 645 | // debugger; |
621 | 646 | // var isiOSSafari = (navigator.userAgent.match(/like Mac OS X/i)) ? true : false; |
... | ... | @@ -1050,7 +1075,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1050 | 1075 | |
1051 | 1076 | |
1052 | 1077 | function start() { |
1053 | - debugger; | |
1078 | + // debugger; | |
1054 | 1079 | context.drawImage(img, 0, 0); |
1055 | 1080 | }; |
1056 | 1081 | // $('#daLoaderLabel').css('visibility', 'visible') | ... | ... |