pairing_matrix 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/pairing_matrix/server/public/index.js +1 -1
- data/lib/pairing_matrix/server/public/matrix.js +57 -16
- data/lib/pairing_matrix/version.rb +1 -1
- data/pairing_matrix.gemspec +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9de294d0c49a37755ec26bef5fe0455a5e96c7fe
|
4
|
+
data.tar.gz: 6b8f4f58eb23f7a0439e169970d963b5ded06c4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725f1224c7aa0dfd393ef4f541024a3ab438ead50d6b9f750cd1e49c5d8cf83b16b2bb960a514e2acc3d015ff1b351fbed432a99dc59987adfebd3487665e3f0
|
7
|
+
data.tar.gz: aa04c0c2a9acfba65bcbe7d37c85e844cb494b9ef825c7c17973adbe1ef890837c5effe032ea3afee448f1d24df31e20921b7d90af68a83602b64aadecb9bd52
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
var playground;
|
2
|
+
|
3
|
+
|
2
4
|
function PlayGround(selector) {
|
3
5
|
this.el = null;
|
4
6
|
this.centerX = 400;
|
@@ -45,6 +47,7 @@ function PlayGround(selector) {
|
|
45
47
|
return "M " + fromCoordinates.x + " " + fromCoordinates.y + " Q 400 350 " +
|
46
48
|
toCoordinates.x + " " + toCoordinates.y;
|
47
49
|
})
|
50
|
+
.attr("id", function(d) {return d.join('_')})
|
48
51
|
.attr("fill", "none")
|
49
52
|
.attr("stroke", "#DD1031")
|
50
53
|
.attr("stroke-width", function (d) {
|
@@ -93,7 +96,8 @@ function PlayGround(selector) {
|
|
93
96
|
.attr("id", function (d) {
|
94
97
|
return d
|
95
98
|
})
|
96
|
-
.
|
99
|
+
.on('mouseover', this.mouseOver)
|
100
|
+
.on('mouseout', this.mouseOut)
|
97
101
|
players.append("text")
|
98
102
|
.attr("class", "player_names")
|
99
103
|
.text(function (d) {
|
@@ -108,21 +112,58 @@ function PlayGround(selector) {
|
|
108
112
|
.attr("fill", "#000000");
|
109
113
|
};
|
110
114
|
|
111
|
-
this.
|
112
|
-
return
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
})
|
124
|
-
|
125
|
-
|
115
|
+
this.getAllPairsContaining = function(name) {
|
116
|
+
return _.filter(this.validPairsData, function(pair) {
|
117
|
+
return pair.indexOf(name) >= 0
|
118
|
+
});
|
119
|
+
};
|
120
|
+
|
121
|
+
this.mouseOut = function(id) {
|
122
|
+
var connectedPairs = playground.getAllPairsContaining(id);
|
123
|
+
connectedPairs.forEach(function(pair) {
|
124
|
+
var firstPerson = pair[0];
|
125
|
+
var secondPerson = pair[1];
|
126
|
+
d3.selectAll($("#" + firstPerson))
|
127
|
+
.style("fill", function(d) {return d.color})
|
128
|
+
.style("stroke", "#EE1031")
|
129
|
+
d3.selectAll($("#" + secondPerson))
|
130
|
+
.style("fill", function(d) {return d.color})
|
131
|
+
.style("stroke", "#EE1031")
|
132
|
+
var pairId = pair.join('_');
|
133
|
+
d3.selectAll($("#" + pairId))
|
134
|
+
.style("fill", "none")
|
135
|
+
.style("stroke", "red")
|
136
|
+
.style("stroke-width", function(d) {return d.color})
|
137
|
+
})
|
138
|
+
d3.selectAll($("#" + id))
|
139
|
+
.style("fill", function(d) {return d.color})
|
140
|
+
.style("stroke", "#EE1031")
|
141
|
+
.attr("stroke-opacity", 0.75)
|
142
|
+
.attr("stroke-width", function (d) {
|
143
|
+
return playground.connectionScale(playground.getSoloContribution(d))
|
144
|
+
});
|
145
|
+
}
|
146
|
+
|
147
|
+
this.mouseOver = function (id) {
|
148
|
+
var connectedPairs = playground.getAllPairsContaining(id);
|
149
|
+
connectedPairs.forEach(function(pair) {
|
150
|
+
var firstPerson = pair[0];
|
151
|
+
var secondPerson = pair[1];
|
152
|
+
d3.selectAll($("#" + firstPerson))
|
153
|
+
.style("fill", "red")
|
154
|
+
.style("stroke", "blue");
|
155
|
+
d3.selectAll($("#" + secondPerson))
|
156
|
+
.style("fill", "red")
|
157
|
+
.style("stroke", "blue");
|
158
|
+
var pairId = pair.join('_');
|
159
|
+
d3.selectAll($("#" + pairId))
|
160
|
+
.style("fill", "none")
|
161
|
+
.style("stroke", "black")
|
162
|
+
.style("stroke-width", "2px")
|
163
|
+
})
|
164
|
+
d3.selectAll($("#" + id))
|
165
|
+
.style("fill", "red")
|
166
|
+
.style("stroke", "blue");
|
126
167
|
};
|
127
168
|
|
128
169
|
this.updateConnectorsPath = function (playerId, newPoint) {
|
data/pairing_matrix.gemspec
CHANGED
@@ -18,5 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
22
|
+
spec.add_dependency 'sinatra', '~> 1.4.8'
|
22
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pairing_matrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ajit Singh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sinatra
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.4.8
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.4.8
|
27
41
|
description: Draw pairing matrix from given repos and configurations
|
28
42
|
email:
|
29
43
|
- jeetsingh.ajit@gmail.com
|
@@ -69,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
83
|
version: '0'
|
70
84
|
requirements: []
|
71
85
|
rubyforge_project:
|
72
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.5.1
|
73
87
|
signing_key:
|
74
88
|
specification_version: 4
|
75
89
|
summary: Draw pairing matrix from given repos and configurations
|