|
28
|
1 |
(function ($) { |
|
|
2 |
$.fn.vs.chart = { |
|
|
3 |
/* |
|
|
4 |
actually empty everything is in |
|
|
5 |
_vs.AxisLabelLayout.js, |
|
|
6 |
_vs.AxisLayout.js, |
|
|
7 |
_vs.CircleLayout.js, |
|
|
8 |
_vs.CollapsedStackLayout.js, |
|
|
9 |
_vs.GridLayout.js, |
|
|
10 |
_vs.StackedAreaChart.js |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
this.update = function(_this,options){ |
|
|
14 |
var defaultOptions = {cat:0,y:0} |
|
|
15 |
if(_this.chartPhySetup.grounds[options.cat]!=null) { |
|
|
16 |
var myBody = _this.chartPhySetup.grounds[options.cat].GetBody(); |
|
|
17 |
var myPos = myBody.GetWorldCenter(); |
|
|
18 |
myPos.y-=options.y/ _this.settings.options.scale; |
|
|
19 |
myBody.SetPosition(myPos); |
|
|
20 |
//console.log(myBody) |
|
|
21 |
} |
|
|
22 |
} |
|
|
23 |
|
|
|
24 |
this.getPosition = function(_this){ |
|
|
25 |
var result =[] |
|
|
26 |
for (var i = 0; i < _this.chartPhySetup.grounds.length; i++) { |
|
|
27 |
myBody = _this.chartPhySetup.grounds[i].GetBody(); |
|
|
28 |
|
|
|
29 |
console.log(myBody.GetWorldCenter()) |
|
|
30 |
|
|
|
31 |
result.push({ |
|
|
32 |
x:(myBody.GetWorldCenter().x* _this.settings.options.scale), |
|
|
33 |
y:(myBody.GetWorldCenter().y* _this.settings.options.scale), |
|
|
34 |
a:myBody.GetAngle() |
|
|
35 |
}) |
|
|
36 |
|
|
|
37 |
}; |
|
|
38 |
return result |
|
|
39 |
} |
|
|
40 |
*/ |
|
|
41 |
} |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
})(jQuery); |