Commit 4d3879ab68e33e6bb1595db1b71538ae96fde1ee
1 parent
c32fc8d5
added and commented code for creating pin directly on Div
Showing
1 changed file
with
53 additions
and
0 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -185,6 +185,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
185 | 185 | function (result) { |
186 | 186 | $scope.aaPinData = result.data.Root.Item; |
187 | 187 | angular.forEach($scope.aaPinData, function (value, key) { |
188 | + //CREATING PIN WITHOUT CANAVS | |
189 | + //var ax = value._PinX; | |
190 | + //var ay = value._PinY; | |
191 | + //var bx = value._HeadX; | |
192 | + //var by = value._HeadY; | |
193 | + | |
194 | + //if (ax > bx) { | |
195 | + // bx = ax + bx; | |
196 | + // ax = bx - ax; | |
197 | + // bx = bx - ax; | |
198 | + // by = ay + by; | |
199 | + // ay = by - ay; | |
200 | + // by = by - ay; | |
201 | + //} | |
202 | + | |
203 | + | |
204 | + //console.log('ax: ' + ax); | |
205 | + //console.log('ay: ' + ay); | |
206 | + //console.log('bx: ' + bx); | |
207 | + //console.log('by: ' + by); | |
208 | + | |
209 | + //var angle = Math.atan((ay - by) / (bx - ax)); | |
210 | + //console.log('angle: ' + angle); | |
211 | + | |
212 | + //angle = (angle * 180 / Math.PI); | |
213 | + //console.log('angle: ' + angle); | |
214 | + //angle = -angle; | |
215 | + //console.log('angle: ' + angle); | |
216 | + | |
217 | + //var length = Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by)); | |
218 | + //console.log('length: ' + length); | |
219 | + | |
220 | + //var style = "" | |
221 | + //style += "left:" + (ax) + "px;" | |
222 | + //style += "top:" + (ay) + "px;" | |
223 | + //style += "width:" + length + "px;" | |
224 | + //style += "height:1px;" | |
225 | + //style += "background-color:black;" | |
226 | + //style += "position:absolute;" | |
227 | + //style += "transform:rotate(" + angle + "deg);" | |
228 | + //style += "-ms-transform:rotate(" + angle + "deg);" | |
229 | + //style += "transform-origin:0% 0%;" | |
230 | + //style += "-moz-transform:rotate(" + angle + "deg);" | |
231 | + //style += "-moz-transform-origin:0% 0%;" | |
232 | + //style += "-webkit-transform:rotate(" + angle + "deg);" | |
233 | + //style += "-webkit-transform-origin:0% 0%;" | |
234 | + //style += "-o-transform:rotate(" + angle + "deg);" | |
235 | + //style += "-o-transform-origin:0% 0%;" | |
236 | + //style += "-webkit-box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, .1);" | |
237 | + //style += "box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, .1);" | |
238 | + //style += "z-index:99;" | |
239 | + //$("<div id= '"+value._PinId+"' style='" + style + "'></div>").appendTo('#imageDiv'); | |
240 | + //END | |
188 | 241 | |
189 | 242 | $scope.context.beginPath(); |
190 | 243 | $scope.context.moveTo(value._PinX, value._PinY); | ... | ... |