1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Code linting.

This commit is contained in:
kkapsner 2017-10-03 15:35:31 +02:00
parent cde71f8a62
commit ef38abe545
24 changed files with 642 additions and 559 deletions

View file

@ -1,4 +1,3 @@
/* jslint moz: true */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -37,24 +36,24 @@
color.count += 1;
if (color.count > color.nextColor.count){
// swap colors to remain in right order
// a -> b -> c -> d becomes a -> c -> b -> d
var a = color.previousColor;
var b = color;
// a_ -> b_ -> c -> d becomes a_ -> c -> b_ -> d
var a_ = color.previousColor;
var b_ = color;
var c = color.nextColor;
var d = color.nextColor.nextColor;
a.nextColor = c;
c.previousColor = a;
a_.nextColor = c;
c.previousColor = a_;
c.nextColor = b;
b.previousColor = c;
c.nextColor = b_;
b_.previousColor = c;
b.nextColor = d;
d.previousColor = b;
b_.nextColor = d;
d.previousColor = b_;
}
}
getMaxColors(n){
var n = Math.min(n, this.numberOfColors);
n = Math.min(n, this.numberOfColors);
var colors = Object.create(null);
var current = this.maxBoundary;
for (;n && current;n -= 1){
@ -76,5 +75,5 @@
);
}
return statistic;
}
};
}());