From fba1b7a55cb3a4e67797c16851ba9ff01430f77f Mon Sep 17 00:00:00 2001 From: mitali Date: Tue, 26 Jul 2016 11:30:42 +0530 Subject: [PATCH] commit navman --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 58 +++++++++------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html | 2 +- 2 files changed, 10 insertions(+), 50 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 9219629..a55f542 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -471,8 +471,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $http({ method: 'GET', url: '~/../content/data/json/da/da_dat_orient_image.json' }).success(function (data) { $scope.NavigatorData = data; - // $scope.NavOrientationdata = $scope.NavigatorData.Navigtor.ViewOrientation; - $scope.skinTone = DA[0].ethnicity; $scope.viewOrientationId = $scope.voId; @@ -496,7 +494,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var navimagemodesty; angular.forEach($scope.NavOrientationdata, function (value, key) { - //debugger; if (value._HaveModesty === DA[0].modesty) { navimagemodesty = value._ImageName; } @@ -507,40 +504,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - alert(navimagemodesty); - - // var imageObj = new Image(); - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.viewOrientationId + '/' + $scope.skinTone + '/navigator_images/' + navimagemodesty; - var x = $("#draggable").position(); - alert("Drag Top position: " + x.top + "Drag Left position: " + x.left); - - - - - - //$('#daBodyview').css("height", $(window).outerHeight()); - - //$('#daBodyview').css("width", $(window).outerWidth()); - - //alert("canvasDiv height:" + $('#draggable').height() + "/n canvasDiv Width:" + $('#canvasDiv').width()); - - //imageObj.src = navimgsrc; - - //var canvas = document.getElementById('navcanvas'); - //var context = canvas.getContext('2d'); - //var imageObj = new Image(); - - //imageObj.onload = function () { - // context.drawImage(imageObj, 0, 0); - //}; - - //imageObj.src = navimgsrc; - - - - }) .error(function (data, status, headers, config) { @@ -868,6 +833,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$('#containment-wrapper').css('width', navdivw); //$('#containment-wrapper').css('height', navdivh) + //$scope.ycan = $("#canvasDiv").scrollTop(); + //$scope.xcan = $("#canvasDiv").scrollLeft(); } function scaleRectangle(x, y, height, width, mirrorValue) { @@ -4175,23 +4142,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.ScrollCanvasDiv = function () { var x = $("#draggable").position(); - alert("Top position: " + x.top + " Left position: " + x.left); - - - - - alert("CanvasDiv x scroll:" + $("#canvasDiv").scrollLeft() + "\n CanvasDiv y scroll:" + $("#canvasDiv").scrollTop()); - - var scrolly = ((((x.top) * 4) * 3) + 10) * 2; - - //var scrollx = ((((x.left) * 2) * 9) - 10) * 2; - - alert("calculation y:"+scrolly); + var can = $('#canvasDiv'); + var canheight = can[0].scrollHeight; + var canwidth = can[0].scrollWidth; - $("#canvasDiv").scrollTop(scrolly); - // $("#canvasDiv").scrollLeft(scrollx); + var scrolly = (x.top/($('#containment-wrapper').height())) * (canheight) ; + var scrollx = (x.left/$('#containment-wrapper').width()) * (canwidth); + $("#canvasDiv").scrollTop(scrolly); + $("#canvasDiv").scrollLeft(scrollx); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index 380705e..34f950d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -203,7 +203,7 @@
-
+
-- libgit2 0.21.4