diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 00000000..3c283040 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1 @@ +/scriptographer.sh diff --git a/src/color/Color.js b/src/color/Color.js index 3629a7f1..e9053b5d 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -98,7 +98,7 @@ var Color = this.Color = Base.extend(new function() { }, 'hsb-rgb': function(color) { - var h = color._hue / 60, // Scale to 0..6 + var h = (color._hue / 60) % 6, // Scale to 0..6 s = color._saturation, b = color._brightness, i = Math.floor(h), // 0..5 diff --git a/src/tool/Tool.js b/src/tool/Tool.js index 8b1d2058..6b924feb 100644 --- a/src/tool/Tool.js +++ b/src/tool/Tool.js @@ -293,7 +293,10 @@ var Tool = this.Tool = Base.extend({ if (needsChange && pt.equals(this._point)) return false; } - this._lastPoint = this._point; + // Make sure mousemove events have lastPoint set even for the first move + // so event.delta is always defined for them. + // TODO: Decide wether mousedown also should always have delta set. + this._lastPoint = start && type == 'mousemove' ? pt : this._point; this._point = pt; switch (type) { case 'mousedown': diff --git a/src/util/BlendMode.js b/src/util/BlendMode.js index c2a1d256..5f4b7e3c 100644 --- a/src/util/BlendMode.js +++ b/src/util/BlendMode.js @@ -203,13 +203,6 @@ var BlendMode = { db = (bb + sb) / 2; }, - 'pin-light': function() { - var op = sr < 128 ? min : max; - dr = op(sr, br); - dg = op(sg, bg); - db = op(sb, bb); - }, - negation: function() { dr = 255 - abs(255 - sr - br); dg = 255 - abs(255 - sg - bg);