Commit c56d1b5e by Valera Rozuvan

Checked JS files with linter, corrected a few minor issues.

parent b78e0440
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* @requires logme * @requires logme
* *
* @external d3 * @external d3, $, RequireJS
*/ */
(function (requirejs, require, define) { (function (requirejs, require, define) {
...@@ -165,7 +165,7 @@ define('WordCloudMain', ['logme'], function (logme) { ...@@ -165,7 +165,7 @@ define('WordCloudMain', ['logme'], function (logme) {
d3.layout.cloud().size([this.width, this.height]) d3.layout.cloud().size([this.width, this.height])
.words(words) .words(words)
.rotate(function () { .rotate(function () {
return ~~(Math.random() * 2) * 90; return Math.floor((Math.random() * 2) * 90);
}) })
.font('Impact') .font('Impact')
.fontSize(function (d) { .fontSize(function (d) {
...@@ -201,11 +201,8 @@ define('WordCloudMain', ['logme'], function (logme) { ...@@ -201,11 +201,8 @@ define('WordCloudMain', ['logme'], function (logme) {
* coordinate object contains two properties: 'x', and 'y'. * coordinate object contains two properties: 'x', and 'y'.
*/ */
WordCloudMain.prototype.drawWordCloud = function (response, words, bounds) { WordCloudMain.prototype.drawWordCloud = function (response, words, bounds) {
// The first word in the list of user enetered words does not get a leading comma.
var firstWord = false,
// Color words in different colors. // Color words in different colors.
fill = d3.scale.category20(), var fill = d3.scale.category20(),
// Will be populated by words the user enetered. // Will be populated by words the user enetered.
studentWordsKeys = [], studentWordsKeys = [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment