TiledViz
Loading...
Searching...
No Matches
Location.js
1$(document).ready( function (){
4 nodeIdProvider = ( function() {
5
6 var i = -1;
7
8 return function(){
9 i++;
10 return i;
11 };
12 })();
13
26 Location = function(x,y) {
27
28 ( function(){
29
30 if(x==undefined)
31 x=0;
32 if(y==undefined)
33 y=0
34 })();
35
36 var X = x;
37 var Y = y;
38
39 this.getX = function(){
40
41 return X;
42 }
43
44 this.getY = function(){
45
46 return Y;
47 }
48
49 this.getXY = function(){
50
51 return [X,Y];
52 }
53
54 this.setX = function(x){
55
56 X=x;
57 }
58
59 this.setY = function(y){
60
61 Y=y;
62 }
63
64 this.setXY = function(x,y){
65
66 setX(x);
67 setY(y);
68 }
69
70 }
71
79 MLocation = function(nx,ny) {
80
81
82 ( function(){
83
84 if(nx==undefined)
85 nx=0;
86 if(ny==undefined)
87 ny=0
88 })();
89
90 var nX = nx;
91 var nY = ny;
92
93 this.getnX = function(){
94
95 return nX;
96 }
97
98 this.getnY = function(){
99
100 return nY;
101 }
102
103 this.getnXY = function(){
104
105 return [nX,nY];
106 }
107
108 setnX = function(nx){
109
110 nX=nx;
111 }
112
113 setnY = function(ny){
114
115 nY=ny;
116
117 }
118
119 setnXY = function(nx,ny){
120
121 setX(nx);
122 setY(ny);
123 }
124
125
126
127
128 };
129 })