From 4d3879ab68e33e6bb1595db1b71538ae96fde1ee Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 30 May 2017 18:12:46 +0530 Subject: [PATCH] added and commented code for creating pin directly on Div --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+), 0 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 187bf34..a7ff48f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -185,6 +185,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo function (result) { $scope.aaPinData = result.data.Root.Item; angular.forEach($scope.aaPinData, function (value, key) { + //CREATING PIN WITHOUT CANAVS + //var ax = value._PinX; + //var ay = value._PinY; + //var bx = value._HeadX; + //var by = value._HeadY; + + //if (ax > bx) { + // bx = ax + bx; + // ax = bx - ax; + // bx = bx - ax; + // by = ay + by; + // ay = by - ay; + // by = by - ay; + //} + + + //console.log('ax: ' + ax); + //console.log('ay: ' + ay); + //console.log('bx: ' + bx); + //console.log('by: ' + by); + + //var angle = Math.atan((ay - by) / (bx - ax)); + //console.log('angle: ' + angle); + + //angle = (angle * 180 / Math.PI); + //console.log('angle: ' + angle); + //angle = -angle; + //console.log('angle: ' + angle); + + //var length = Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by)); + //console.log('length: ' + length); + + //var style = "" + //style += "left:" + (ax) + "px;" + //style += "top:" + (ay) + "px;" + //style += "width:" + length + "px;" + //style += "height:1px;" + //style += "background-color:black;" + //style += "position:absolute;" + //style += "transform:rotate(" + angle + "deg);" + //style += "-ms-transform:rotate(" + angle + "deg);" + //style += "transform-origin:0% 0%;" + //style += "-moz-transform:rotate(" + angle + "deg);" + //style += "-moz-transform-origin:0% 0%;" + //style += "-webkit-transform:rotate(" + angle + "deg);" + //style += "-webkit-transform-origin:0% 0%;" + //style += "-o-transform:rotate(" + angle + "deg);" + //style += "-o-transform-origin:0% 0%;" + //style += "-webkit-box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, .1);" + //style += "box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, .1);" + //style += "z-index:99;" + //$("
").appendTo('#imageDiv'); + //END $scope.context.beginPath(); $scope.context.moveTo(value._PinX, value._PinY); -- libgit2 0.21.4