';
25 | this.divs +='
';
26 | if (typ=='up')
27 | this.divs +='
';
28 | else
29 | this.divs +='
';
30 | this.divs+='
';
31 | this.divs+='
';
32 | this.divs+='
';
33 | this.divs+='
';
34 | if (typ=='up')
35 | this.divs+=' ';
36 | else
37 | this.divs+=' ';
38 | this.divs+='Mbps';
39 | this.divs+='
';
40 | this.divs+='
';
41 | this.divs+='
';
42 | this.dWrite(this.divs);
43 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').show();
44 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').animate({ value: -135 }, {
45 | step: function(now,fx) {
46 | $(this).css('-webkit-transform','rotate('+now+'deg)');
47 | $(this).css('-moz-transform','rotate('+now+'deg)');
48 | $(this).css('transform','rotate('+now+'deg)');
49 | },
50 | duration:1000
51 | },'linear');
52 | $('#'+this.htmlId ).fadeTo( 1000 , 0.25, function() {
53 | });
54 | this.drawDial = function(value) {
55 | if (value>=0) {
56 | if (this.enabled==0) {
57 | this.enabled=1;
58 | $('#'+this.htmlId ).fadeTo( 250 , 1.0, function() {
59 | });
60 | }
61 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').animate({ value: this.vratAngleGauge(value) }, {
62 | step: function(now,fx) {
63 | $(this).css('-webkit-transform','rotate('+now+'deg)');
64 | $(this).css('-moz-transform','rotate('+now+'deg)');
65 | $(this).css('transform','rotate('+now+'deg)');
66 | },
67 | duration:20,
68 | },'linear');
69 | jQuery({someValue: (this.valueOld/1024) , htmlID:this.htmlId }).animate({someValue: (value/1024)}, {
70 | duration: 20,
71 | easing:'linear',
72 | step: function() {
73 | $('#'+this.htmlID+' .mtrwebtester_dial_text_number').text(ntmt_getvalue(this.someValue));
74 | }
75 | });
76 | } else {
77 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').hide();
78 | $('#'+this.htmlId+' .mtrwebtester_dial_text_number').text("NaN");
79 | }
80 | this.valueOld=value;
81 | }
82 | this.resetDial = function() {
83 | if (this.enabled==1) {
84 | this.enabled=0;
85 | $('#'+this.htmlId ).fadeTo( 1000 , 0.25, function() {});
86 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').animate({ value: -135 }, {
87 | step: function(now,fx) {
88 | $(this).css('-webkit-transform','rotate('+now+'deg)');
89 | $(this).css('-moz-transform','rotate('+now+'deg)');
90 | $(this).css('transform','rotate('+now+'deg)');
91 | },
92 | duration:1000
93 | },'linear');
94 | $('#'+this.htmlId+' .mtrwebtester_dial_text_number').html(" ");
95 | }
96 | }
97 | this.vratAngleGauge = function(value) {
98 | tmpvalue=value;
99 | if (tmpvalue>this.DialGaugeMax) {
100 | tmpvalue=this.DialGaugeMax-1;
101 | }
102 | if (value<=0) {
103 | return this.DialGauge[0][1];
104 | }
105 | Angle=0;
106 | for (var i=1;i
';
139 | this.divs+='';
140 | this.divs+='
';
141 | this.divs+='
';
142 | this.divs+='
';
143 | this.divs+='
';
144 | this.divs+='
';
145 | this.divs+=' ';
146 | this.divs+='ms';
147 | this.divs+='
';
148 | this.divs+='
';
149 | this.divs+=' ';
150 | this.dWrite(this.divs);
151 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').show();
152 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').animate({ value: -135 }, {
153 | step: function(now,fx) {
154 | $(this).css('-webkit-transform','rotate('+now+'deg)');
155 | $(this).css('-moz-transform','rotate('+now+'deg)');
156 | $(this).css('transform','rotate('+now+'deg)');
157 | },
158 | duration:1000
159 | },'linear');
160 | $('#'+this.htmlId ).fadeTo( 1000 , 0.25, function() {
161 | });
162 | this.drawDial = function(value) {
163 | if (value>=0) {
164 | if (this.enabled==0) {
165 | this.enabled=1;
166 | $('#'+this.htmlId ).fadeTo( 250 , 1.0, function() {
167 | });
168 | }
169 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').animate({ value: this.vratAngleGauge(value) }, {
170 | step: function(now,fx) {
171 | $(this).css('-webkit-transform','rotate('+now+'deg)');
172 | $(this).css('-moz-transform','rotate('+now+'deg)');
173 | $(this).css('transform','rotate('+now+'deg)');
174 | },
175 | duration:250
176 | },'linear');
177 | jQuery({someValue: (this.valueOld) , htmlID:this.htmlId }).animate({someValue: value}, {
178 | duration: 250,
179 | easing:'linear',
180 | step: function() {
181 | $('#'+this.htmlID+' .mtrwebtester_dial_text_number').text(ntmt_getvalue(this.someValue));
182 | }
183 | });
184 | } else {
185 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').hide();
186 | $('#'+this.htmlId+' .mtrwebtester_dial_text_number').text("NaN");
187 | }
188 | this.valueOld=value;
189 | }
190 | this.resetDial = function() {
191 | if (this.enabled==1) {
192 | this.enabled=0;
193 | $('#'+this.htmlId ).fadeTo( 1000 , 0.25, function() {});
194 | $('#'+this.htmlId+' .mtrwebtester_dial_arrow').animate({ value: -135 }, {
195 | step: function(now,fx) {
196 | $(this).css('-webkit-transform','rotate('+now+'deg)');
197 | $(this).css('-moz-transform','rotate('+now+'deg)');
198 | $(this).css('transform','rotate('+now+'deg)');
199 | },
200 | duration:1000
201 | },'linear');
202 | $('#'+this.htmlId+' .mtrwebtester_dial_text_number').html(" ");
203 | }
204 | }
205 | this.vratAngleGauge = function(value) {
206 | tmpvalue=value;
207 | if (tmpvalue>this.DialGaugeMax) {
208 | tmpvalue=this.DialGaugeMax-1;
209 | }
210 | if (value<=0) {
211 | return this.DialGauge[0][1];
212 | }
213 | Angle=0;
214 | for (var i=1;i