nutella_framework 0.4.23 → 0.4.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/framework_components/monitoring-bot/monitoring-bot.rb +11 -2
- data/framework_components/monitoring-interface/.gitignore +2 -0
- data/framework_components/monitoring-interface/README.md +1 -0
- data/framework_components/monitoring-interface/bower.json +29 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/.bower.json +23 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/bower.json +14 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/mqttws31.js +2081 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/readme.md +4 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/.bower.json +37 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/LICENSE +21 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/README.md +15 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/bower.json +28 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/browser/mqtt_client_hello_world.html +23 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/browser/nutella_hello_world.html +52 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/node/mqtt_client_hello_world.js +14 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/node/nutella_hello_world.js +38 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/nutella_lib.js +789 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/package.json +30 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface.html +215 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/animations.js +27 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/application-view-controller.js +232 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/applications-model.js +61 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/bootstrap.min.js +7 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/cursor.css +7 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/d3.v3.min.js +5 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/graphics.js +156 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/grid-layout.js +103 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/highlight.min.js +2 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/instance-view-controller.js +104 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/jquery-1.10.0.min.js +6 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/notification-center.js +63 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/notifications.js +14 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/page.css +33 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/radial-layout.js +175 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/tab-table.js +8 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-application.css +0 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-application.js +320 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-connection-view.css +10 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-connection-view.js +426 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-element.js +205 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-notification.js +94 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-tab.js +229 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/underscore-min.js +5 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/view-controller.js +68 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/window-view-controller.js +169 -0
- data/framework_components/monitoring-interface/css/alerts.css +3 -0
- data/framework_components/monitoring-interface/css/bootstrap.min.css +5 -0
- data/framework_components/monitoring-interface/css/cursor.css +7 -0
- data/framework_components/monitoring-interface/css/highlight.default.min.css +1 -0
- data/framework_components/monitoring-interface/css/page.css +41 -0
- data/framework_components/monitoring-interface/css/ui-application.css +0 -0
- data/framework_components/monitoring-interface/css/ui-connection-view.css +10 -0
- data/framework_components/monitoring-interface/css/ui-legend-view.css +7 -0
- data/framework_components/monitoring-interface/data/alert.json +8 -0
- data/framework_components/monitoring-interface/data/data.json +2118 -0
- data/framework_components/monitoring-interface/data/data2.json +814 -0
- data/framework_components/monitoring-interface/data/data3.json +823 -0
- data/framework_components/monitoring-interface/data/data4.json +848 -0
- data/framework_components/monitoring-interface/data/message.json +999 -0
- data/framework_components/monitoring-interface/gulpfile.js +29 -0
- data/framework_components/monitoring-interface/img/arrow_white.svg +120 -0
- data/framework_components/monitoring-interface/img/arrow_white_right.svg +104 -0
- data/framework_components/monitoring-interface/img/back.svg +164 -0
- data/framework_components/monitoring-interface/img/cross_red_border_white.svg +143 -0
- data/framework_components/monitoring-interface/img/cross_red_border_white_mouseover.svg +143 -0
- data/framework_components/monitoring-interface/img/email.svg +89 -0
- data/framework_components/monitoring-interface/img/email_highlighted.svg +89 -0
- data/framework_components/monitoring-interface/index.html +144 -0
- data/framework_components/monitoring-interface/js/d3/layout/grid-layout.js +103 -0
- data/framework_components/monitoring-interface/js/d3/layout/radial-layout.js +184 -0
- data/framework_components/monitoring-interface/js/d3/plugin/graphics.js +156 -0
- data/framework_components/monitoring-interface/js/d3/plugin/tab-table.js +8 -0
- data/framework_components/monitoring-interface/js/d3/ui/animations.js +27 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-application.js +471 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-connection-view.js +847 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-element.js +245 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-legend.js +174 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-notification.js +90 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-tab.js +309 -0
- data/framework_components/monitoring-interface/js/lib/JSXTransformer-0.12.2.js +15199 -0
- data/framework_components/monitoring-interface/js/lib/bootstrap.min.js +7 -0
- data/framework_components/monitoring-interface/js/lib/d3.v3.min.js +5 -0
- data/framework_components/monitoring-interface/js/lib/highlight.min.js +2 -0
- data/framework_components/monitoring-interface/js/lib/jquery-1.10.0.min.js +6 -0
- data/framework_components/monitoring-interface/js/lib/nutella_lib.js +5121 -0
- data/framework_components/monitoring-interface/js/lib/react-with-addons-0.12.2.js +19822 -0
- data/framework_components/monitoring-interface/js/lib/underscore-min.js +5 -0
- data/framework_components/monitoring-interface/js/model/alerts-model.js +74 -0
- data/framework_components/monitoring-interface/js/model/applications-model.js +78 -0
- data/framework_components/monitoring-interface/js/model/messages-model.js +112 -0
- data/framework_components/monitoring-interface/js/notification/notification-center.js +63 -0
- data/framework_components/monitoring-interface/js/notification/notifications.js +21 -0
- data/framework_components/monitoring-interface/js/react/dist/ui-alerts.js +178 -0
- data/framework_components/monitoring-interface/js/react/dist/ui-message-send.js +389 -0
- data/framework_components/monitoring-interface/js/react/dist/ui-messages.js +103 -0
- data/framework_components/monitoring-interface/js/react/src/ui-alerts.js +178 -0
- data/framework_components/monitoring-interface/js/react/src/ui-message-send.js +389 -0
- data/framework_components/monitoring-interface/js/react/src/ui-messages.js +103 -0
- data/framework_components/monitoring-interface/js/view-controller/application-view-controller.js +256 -0
- data/framework_components/monitoring-interface/js/view-controller/instance-view-controller.js +112 -0
- data/framework_components/monitoring-interface/js/view-controller/view-controller.js +74 -0
- data/framework_components/monitoring-interface/js/view-controller/window-view-controller.js +169 -0
- data/framework_components/monitoring-interface/nutella.json +6 -0
- data/framework_components/order.json +1 -0
- data/framework_components/roomcast-bot/roomcast_bot.rb +139 -117
- data/framework_components/roomcast-channel-creator/dist/app.js +9 -7
- data/framework_components/roomcast-channel-creator/index.html +1 -1
- data/framework_components/roomcast-channel-creator/src/app/components/main.js +8 -6
- data/framework_components/roomcast-package-creator/dist/app.js +4 -4
- data/framework_components/roomcast-package-creator/index.html +1 -1
- data/framework_components/roomcast-package-creator/package.json +3 -3
- data/framework_components/roomcast-package-creator/src/app/components/ConfigurationsPanel.js +2 -2
- data/framework_components/roomcast-package-creator/src/app/components/PoolRow.js +1 -1
- data/framework_components/roomcast-teacher-controls/.gitignore +2 -0
- data/framework_components/roomcast-teacher-controls/README.md +9 -0
- data/framework_components/roomcast-teacher-controls/dist/app.js +38327 -0
- data/framework_components/roomcast-teacher-controls/dist/main.css +3052 -0
- data/framework_components/roomcast-teacher-controls/dist/nutella_lib.js +5121 -0
- data/framework_components/roomcast-teacher-controls/gulp/config.js +51 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/browserify.js +77 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/build.js +3 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/css.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/default.js +3 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/fonts.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/less.js +16 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/mui-fonts.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/nutella.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/setWatch.js +5 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/svgs.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/watch.js +12 -0
- data/framework_components/roomcast-teacher-controls/gulp/util/bundleLogger.js +21 -0
- data/framework_components/roomcast-teacher-controls/gulp/util/handleErrors.js +15 -0
- data/framework_components/roomcast-teacher-controls/gulpfile.js +16 -0
- data/framework_components/roomcast-teacher-controls/index.html +51 -0
- data/framework_components/roomcast-teacher-controls/nutella.json +6 -0
- data/framework_components/roomcast-teacher-controls/package.json +38 -0
- data/framework_components/roomcast-teacher-controls/src/app/app.js +22 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivitiesGrid.js +87 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivityCard.js +141 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/Channel.js +70 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/Footer.js +34 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/main.js +74 -0
- data/framework_components/roomcast-teacher-controls/src/less/main.less +186 -0
- data/framework_components/roomcast-teacher-controls/src/less/my_overrides.less +14 -0
- data/lib/commands/meta/run_command.rb +11 -9
- metadata +135 -2
@@ -0,0 +1,184 @@
|
|
1
|
+
(function() {
|
2
|
+
d3.layout.radial = function() {
|
3
|
+
|
4
|
+
// Private variables
|
5
|
+
this._numChannels = undefined;
|
6
|
+
this._numComponents = undefined;
|
7
|
+
|
8
|
+
this._margin = 0; // Margin between components in %
|
9
|
+
this._radius = undefined;
|
10
|
+
this._linkRadius = undefined;
|
11
|
+
|
12
|
+
// Public variables
|
13
|
+
this.components = undefined;
|
14
|
+
this.channels = undefined;
|
15
|
+
this.links = undefined;
|
16
|
+
|
17
|
+
this.publishChannels = undefined;
|
18
|
+
this.subscribeChannels = undefined;
|
19
|
+
this.requestChannels = undefined;
|
20
|
+
this.handleRequestChannels = undefined;
|
21
|
+
|
22
|
+
|
23
|
+
this.data = function(components) {
|
24
|
+
var self = this;
|
25
|
+
|
26
|
+
this.components = [];
|
27
|
+
this.channels = [];
|
28
|
+
this.links = [];
|
29
|
+
|
30
|
+
this.publishChannels = [];
|
31
|
+
this.subscribeChannels = [];
|
32
|
+
this.requestChannels = [];
|
33
|
+
this.handleRequestChannels = [];
|
34
|
+
|
35
|
+
this._numComponents = components.length;
|
36
|
+
var numChannels = 0;
|
37
|
+
|
38
|
+
// Clone components and calculate number of channels
|
39
|
+
components.forEach(function(component) {
|
40
|
+
numChannels += component.publish.length;
|
41
|
+
numChannels += component.subscribe.length;
|
42
|
+
numChannels += component.request.length;
|
43
|
+
numChannels += component.handle_request.length;
|
44
|
+
|
45
|
+
self.components.push(component);
|
46
|
+
});
|
47
|
+
|
48
|
+
this._numChannels = numChannels;
|
49
|
+
|
50
|
+
// Calculate angle of components
|
51
|
+
var angle = 0;
|
52
|
+
this.components.forEach(function(component) {
|
53
|
+
var numChannels = 0;
|
54
|
+
numChannels += component.publish.length;
|
55
|
+
numChannels += component.subscribe.length;
|
56
|
+
numChannels += component.request.length;
|
57
|
+
numChannels += component.handle_request.length;
|
58
|
+
|
59
|
+
var angleMargin = 2 * Math.PI * self._margin / self._numComponents;
|
60
|
+
|
61
|
+
component.startAngle = angle;
|
62
|
+
component.endAngle = angle + numChannels * 2 * Math.PI * (1.0 - self._margin) / self._numChannels;
|
63
|
+
|
64
|
+
angle = component.endAngle + angleMargin;
|
65
|
+
|
66
|
+
// Calculate angle for every channel
|
67
|
+
var deltaAngle = (component.endAngle - component.startAngle) / numChannels;
|
68
|
+
var channelAngle = component.startAngle + deltaAngle / 2.0;
|
69
|
+
component.publish.forEach(function(publish) {
|
70
|
+
publish.angle = channelAngle;
|
71
|
+
publish.radius = self._radius;
|
72
|
+
channelAngle += deltaAngle;
|
73
|
+
|
74
|
+
self.channels.push(publish);
|
75
|
+
self.publishChannels.push(publish);
|
76
|
+
});
|
77
|
+
component.subscribe.forEach(function(subscribe) {
|
78
|
+
subscribe.angle = channelAngle;
|
79
|
+
subscribe.radius = self._radius;
|
80
|
+
channelAngle += deltaAngle;
|
81
|
+
|
82
|
+
self.channels.push(subscribe);
|
83
|
+
self.subscribeChannels.push(subscribe);
|
84
|
+
});
|
85
|
+
component.request.forEach(function(request) {
|
86
|
+
request.angle = channelAngle;
|
87
|
+
request.radius = self._radius;
|
88
|
+
channelAngle += deltaAngle;
|
89
|
+
|
90
|
+
self.channels.push(request);
|
91
|
+
self.requestChannels.push(request);
|
92
|
+
});
|
93
|
+
component.handle_request.forEach(function(handleRequest) {
|
94
|
+
handleRequest.angle = channelAngle;
|
95
|
+
handleRequest.radius = self._radius;
|
96
|
+
channelAngle += deltaAngle;
|
97
|
+
|
98
|
+
self.channels.push(handleRequest);
|
99
|
+
self.handleRequestChannels.push(handleRequest);
|
100
|
+
});
|
101
|
+
});
|
102
|
+
|
103
|
+
// Calculate links
|
104
|
+
self.components.forEach(function(component1) {
|
105
|
+
|
106
|
+
// Publish - Subscribe
|
107
|
+
component1.publish.forEach(function(publish) {
|
108
|
+
self.components.forEach(function(component2) {
|
109
|
+
component2.subscribe.forEach(function(subscribe) {
|
110
|
+
if(publish.channel == subscribe.channel) {
|
111
|
+
publish.component = component1.name;
|
112
|
+
subscribe.component = component2.name;
|
113
|
+
var link = {
|
114
|
+
type: "publish",
|
115
|
+
channel: publish.channel,
|
116
|
+
source: publish,
|
117
|
+
destination: subscribe,
|
118
|
+
coordinates: [
|
119
|
+
{angle: publish.angle, radius: self._linkRadius},
|
120
|
+
{angle: (publish.angle + subscribe.angle) / 2.0, radius: 0},
|
121
|
+
{angle: subscribe.angle, radius: self._linkRadius}
|
122
|
+
]
|
123
|
+
};
|
124
|
+
self.links.push(link);
|
125
|
+
}
|
126
|
+
});
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
// Request - Response
|
131
|
+
component1.request.forEach(function(request) {
|
132
|
+
self.components.forEach(function(component2) {
|
133
|
+
component2.handle_request.forEach(function(handle_request) {
|
134
|
+
if(request.channel == handle_request.channel) {
|
135
|
+
request.component = component1.name;
|
136
|
+
handle_request.component = component2.name;
|
137
|
+
var link = {
|
138
|
+
type: "request",
|
139
|
+
channel: request.channel,
|
140
|
+
source: request,
|
141
|
+
destination: handle_request,
|
142
|
+
coordinates: [
|
143
|
+
{angle: request.angle, radius: self._linkRadius},
|
144
|
+
{angle: (request.angle + handle_request.angle) / 2.0, radius: 0},
|
145
|
+
{angle: handle_request.angle, radius: self._linkRadius}
|
146
|
+
]
|
147
|
+
};
|
148
|
+
self.links.push(link);
|
149
|
+
}
|
150
|
+
});
|
151
|
+
});
|
152
|
+
});
|
153
|
+
});
|
154
|
+
|
155
|
+
return this;
|
156
|
+
};
|
157
|
+
|
158
|
+
this.margin = function(margin) {
|
159
|
+
if(margin == undefined)
|
160
|
+
return this._margin;
|
161
|
+
|
162
|
+
this._margin = margin;
|
163
|
+
return this;
|
164
|
+
};
|
165
|
+
|
166
|
+
this.radius = function(radius) {
|
167
|
+
if(radius == undefined)
|
168
|
+
return this._radius;
|
169
|
+
|
170
|
+
this._radius = radius;
|
171
|
+
return this;
|
172
|
+
};
|
173
|
+
|
174
|
+
this.linkRadius = function(radius) {
|
175
|
+
if(radius == undefined)
|
176
|
+
return this._linkRadius;
|
177
|
+
|
178
|
+
this._linkRadius = radius;
|
179
|
+
return this;
|
180
|
+
};
|
181
|
+
|
182
|
+
return this;
|
183
|
+
};
|
184
|
+
})();
|
@@ -0,0 +1,156 @@
|
|
1
|
+
(function() {
|
2
|
+
d3.selection.prototype.translate = d3.selection.enter.prototype.translate = d3.transition.prototype.translate = function(x, y) {
|
3
|
+
var self = this;
|
4
|
+
var marginX = self.margin.x || 0;
|
5
|
+
var marginY = self.margin.y || 0;
|
6
|
+
return this.attr("transform", function(d) { return "translate(" + (x + marginX) + "," + (y + marginY) + ")"});
|
7
|
+
};
|
8
|
+
|
9
|
+
d3.selection.prototype.rotate = d3.selection.enter.prototype.rotate = function(degree, x, y) {
|
10
|
+
var self = this;
|
11
|
+
if(x != undefined && y != undefined)
|
12
|
+
this.attr("transform", function(d) { return "rotate(" + degree + ")"});
|
13
|
+
else
|
14
|
+
this.attr("transform", function(d) { return "rotate(" + degree + " " + x + "," + y + ")"});
|
15
|
+
|
16
|
+
return this;
|
17
|
+
};
|
18
|
+
|
19
|
+
d3.selection.prototype.rotateText = d3.selection.enter.prototype.rotateText = d3.transition.prototype.rotateText = function() {
|
20
|
+
|
21
|
+
function toDegrees (radians) {
|
22
|
+
return radians * (180 / Math.PI);
|
23
|
+
}
|
24
|
+
|
25
|
+
var self = this;
|
26
|
+
|
27
|
+
this.attr("transform", function(d) { return "translate(" + d.radius*Math.sin(d.angle) + ", " + (-d.radius*Math.cos(d.angle)) + ")" +
|
28
|
+
"rotate(" + toDegrees(-Math.PI/2+d.angle) + ")" +
|
29
|
+
(d.angle > Math.PI ? "rotate(180)" : "") +
|
30
|
+
(d.angle > Math.PI ? "translate(0, 4)" : "translate(0, 2)")}) // Text alignment
|
31
|
+
.attr("text-anchor", function(d) { return d.angle < Math.PI ? "start" : "end"; });
|
32
|
+
|
33
|
+
/*
|
34
|
+
this.attr("transform", function(d) { return "translate(" + d.radius + ", 0)"})
|
35
|
+
.attr("text-anchor", function(d) { return d.angle < 180 ? "start" : "end"; })
|
36
|
+
.attr("transform", function(d) { return d.angle < 180 ? null : "rotate(180)"; });
|
37
|
+
*/
|
38
|
+
|
39
|
+
return this;
|
40
|
+
};
|
41
|
+
|
42
|
+
d3.selection.prototype.width = d3.selection.enter.prototype.width = d3.transition.prototype.width = function(width) {
|
43
|
+
var self = this;
|
44
|
+
var margin = this.margin.x || 0;
|
45
|
+
return this.attr("width", width - margin * 2);
|
46
|
+
};
|
47
|
+
|
48
|
+
d3.selection.prototype.height = d3.selection.enter.prototype.height = d3.transition.prototype.height = function(height) {
|
49
|
+
var self = this;
|
50
|
+
var margin = this.margin.y || 0;
|
51
|
+
return this.attr("height", height - margin * 2);
|
52
|
+
};
|
53
|
+
|
54
|
+
d3.selection.prototype.x = d3.selection.enter.prototype.x = d3.transition.prototype.x = function(x) {
|
55
|
+
var self = this;
|
56
|
+
return this.attr("x", x);
|
57
|
+
};
|
58
|
+
|
59
|
+
d3.selection.prototype.y = d3.selection.enter.prototype.y = d3.transition.prototype.y = function(y) {
|
60
|
+
var self = this;
|
61
|
+
return this.attr("y", y);
|
62
|
+
};
|
63
|
+
|
64
|
+
d3.selection.prototype.cx = d3.selection.enter.prototype.cx = d3.transition.prototype.cx = function(x) {
|
65
|
+
var self = this;
|
66
|
+
return this.attr("cx", x);
|
67
|
+
};
|
68
|
+
|
69
|
+
d3.selection.prototype.cy = d3.selection.enter.prototype.cy = d3.transition.prototype.cy = function(y) {
|
70
|
+
var self = this;
|
71
|
+
return this.attr("cy", y);
|
72
|
+
};
|
73
|
+
|
74
|
+
d3.selection.prototype.fill = d3.selection.enter.prototype.fill = d3.transition.prototype.fill = function(fill) {
|
75
|
+
var self = this;
|
76
|
+
return this.attr("fill", fill);
|
77
|
+
};
|
78
|
+
|
79
|
+
|
80
|
+
d3.selection.prototype.margin = d3.selection.enter.prototype.margin = d3.transition.prototype.margin = function(margin) {
|
81
|
+
this.margin.x = margin;
|
82
|
+
this.margin.y = margin;
|
83
|
+
return this;
|
84
|
+
};
|
85
|
+
|
86
|
+
d3.selection.prototype.newView = d3.selection.enter.prototype.newView = d3.transition.prototype.newView = function() {
|
87
|
+
return this.append("g");
|
88
|
+
};
|
89
|
+
|
90
|
+
d3.selection.prototype.class = d3.selection.enter.prototype.class = d3.transition.prototype.class = function(className) {
|
91
|
+
var cn = {};
|
92
|
+
cn[className] = true;
|
93
|
+
this.classed(cn);
|
94
|
+
return this;
|
95
|
+
};
|
96
|
+
|
97
|
+
d3.selection.prototype.classRemove = d3.selection.enter.prototype.classRemove = d3.transition.prototype.classRemove = function(className) {
|
98
|
+
var cn = {};
|
99
|
+
cn[className] = false;
|
100
|
+
this.classed(cn);
|
101
|
+
return this;
|
102
|
+
};
|
103
|
+
|
104
|
+
d3.selection.prototype.opacity = d3.selection.enter.prototype.opacity = d3.transition.prototype.opacity = function(opacity) {
|
105
|
+
this.style("opacity", opacity);
|
106
|
+
return this;
|
107
|
+
};
|
108
|
+
|
109
|
+
d3.selection.prototype.layerWithName = function(className) {
|
110
|
+
this.selectAll("."+className)
|
111
|
+
.data([{}])
|
112
|
+
.enter()
|
113
|
+
.append("g")
|
114
|
+
.class(className);
|
115
|
+
|
116
|
+
return this.selectAll("."+className);
|
117
|
+
};
|
118
|
+
|
119
|
+
d3.selection.prototype.rotateTextZeroAngle = d3.selection.enter.prototype.rotateTextZeroAngle = d3.transition.prototype.rotateTextZeroAngle = function() {
|
120
|
+
|
121
|
+
function toDegrees (radians) {
|
122
|
+
return radians * (180 / Math.PI);
|
123
|
+
}
|
124
|
+
|
125
|
+
var self = this;
|
126
|
+
|
127
|
+
this.attr("transform", function(d) { return "rotate(" + toDegrees(-Math.PI/2+d.angle) + ")" +
|
128
|
+
(d.angle > Math.PI ? "rotate(180)" : ""); })
|
129
|
+
.attr("text-anchor", function(d) { return d.angle < Math.PI ? "start" : "end"; });
|
130
|
+
|
131
|
+
|
132
|
+
return this;
|
133
|
+
};
|
134
|
+
|
135
|
+
d3.selection.prototype.rotateLayer = d3.selection.enter.prototype.rotateLayer = d3.transition.prototype.rotateLayer = function() {
|
136
|
+
|
137
|
+
function toDegrees (radians) {
|
138
|
+
return radians * (180 / Math.PI);
|
139
|
+
}
|
140
|
+
|
141
|
+
var self = this;
|
142
|
+
|
143
|
+
this.attr("transform", function(d) { return "translate(" + d.radius*Math.sin(d.angle) + ", " + (-d.radius*Math.cos(d.angle)) + ")" +
|
144
|
+
"rotate(" + toDegrees(d.angle) + ")"});
|
145
|
+
|
146
|
+
return this;
|
147
|
+
};
|
148
|
+
|
149
|
+
d3.selection.prototype.r = d3.selection.enter.prototype.r = d3.transition.prototype.r = function(radius) {
|
150
|
+
|
151
|
+
this.attr("r", radius);
|
152
|
+
|
153
|
+
return this;
|
154
|
+
};
|
155
|
+
|
156
|
+
})();
|
@@ -0,0 +1,27 @@
|
|
1
|
+
var Animations = Animations || {};
|
2
|
+
|
3
|
+
Animations.connectionView = {
|
4
|
+
LINK_FADE_IN: {delay: 500, duration: 1000},
|
5
|
+
CIRCLE_EXPANSION: {delay: 100, duration: 500},
|
6
|
+
ARROW_EXPANSION: {delay: 0, duration: 500}
|
7
|
+
};
|
8
|
+
|
9
|
+
Animations.application = {
|
10
|
+
GRID_LAYOUT_REPOSITION : {delay: 0, duration: 500},
|
11
|
+
APPLICATION_EXPANSION: {delay: 0, duration: 500},
|
12
|
+
APPLICATION_REDUCTION: {delay: 0, duration: 500}
|
13
|
+
};
|
14
|
+
|
15
|
+
Animations.instance = {
|
16
|
+
INSTANCE_ENTER : {delay: 0, duration: 500},
|
17
|
+
INSTANCE_EXIT: {delay: 0, duration: 500}
|
18
|
+
};
|
19
|
+
|
20
|
+
Animations.optionRect = {
|
21
|
+
INSTANCE_ENTER : {delay: 500, duration: 500}
|
22
|
+
};
|
23
|
+
|
24
|
+
Animations.notification = {
|
25
|
+
NOTIFICATION_FADE_IN: {delay: 400, duration: 500},
|
26
|
+
NOTIFICATION_FADE_OUT: {delay: 0, duration: 100}
|
27
|
+
};
|