mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
formatting: remove trailing whitespaces on files Sebastian is going to modify
In the following commits Sebastian is going to edit three files. This change is necessary make evident what he is going to modify, because some of them are old vendorized libraries whose history we might want to reconstruct. No functional changes. Command: sed --in-place 's/[[:space:]]*$//' src/static/js/farbtastic.js sed --in-place 's/[[:space:]]*$//' src/static/js/gritter.js sed --in-place 's/[[:space:]]*$//' tests/frontend/specs/change_user_color.js
This commit is contained in:
parent
082906ace2
commit
c0d9797d0f
3 changed files with 105 additions and 105 deletions
|
@ -1,6 +1,6 @@
|
|||
// Farbtastic 2.0 alpha
|
||||
(function ($) {
|
||||
|
||||
|
||||
var __debug = false;
|
||||
var __factor = 0.8;
|
||||
|
||||
|
@ -16,7 +16,7 @@ $.farbtastic = function (container, options) {
|
|||
|
||||
$._farbtastic = function (container, options) {
|
||||
var fb = this;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
|
@ -134,7 +134,7 @@ $._farbtastic = function (container, options) {
|
|||
fb.ctxOverlay = fb.cnvOverlay[0].getContext('2d');
|
||||
fb.ctxMask.translate(fb.mid, fb.mid);
|
||||
fb.ctxOverlay.translate(fb.mid, fb.mid);
|
||||
|
||||
|
||||
// Draw widget base layers.
|
||||
fb.drawCircle();
|
||||
fb.drawMask();
|
||||
|
@ -208,7 +208,7 @@ $._farbtastic = function (container, options) {
|
|||
m.restore();
|
||||
__debug && $('body').append('<div>drawCircle '+ (+(new Date()) - tm) +'ms');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Draw the saturation/luminance mask.
|
||||
*/
|
||||
|
@ -232,9 +232,9 @@ $._farbtastic = function (container, options) {
|
|||
|
||||
outputPixel(x, y, c, a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Method #1: direct pixel access (new Canvas).
|
||||
if (fb.ctxMask.getImageData) {
|
||||
// Create half-resolution buffer.
|
||||
|
@ -295,7 +295,7 @@ $._farbtastic = function (container, options) {
|
|||
}
|
||||
cache.push([c, a]);
|
||||
});
|
||||
}
|
||||
}
|
||||
__debug && $('body').append('<div>drawMask '+ (+(new Date()) - tm) +'ms');
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ $._farbtastic = function (container, options) {
|
|||
|
||||
// Draw markers
|
||||
fb.drawMarkers();
|
||||
|
||||
|
||||
// Linked elements or callback
|
||||
if (typeof fb.callback == 'object') {
|
||||
// Set background/foreground color
|
||||
|
@ -363,15 +363,15 @@ $._farbtastic = function (container, options) {
|
|||
fb.callback.call(fb, fb.color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper for returning coordinates relative to the center.
|
||||
*/
|
||||
fb.widgetCoords = function (event) {
|
||||
return {
|
||||
x: event.pageX - fb.offset.left - fb.mid,
|
||||
x: event.pageX - fb.offset.left - fb.mid,
|
||||
y: event.pageY - fb.offset.top - fb.mid
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -434,7 +434,7 @@ $._farbtastic = function (container, options) {
|
|||
fb.packDX = function (c, a) {
|
||||
return '#' + fb.dec2hex(a) + fb.dec2hex(c) + fb.dec2hex(c) + fb.dec2hex(c);
|
||||
};
|
||||
|
||||
|
||||
fb.pack = function (rgb) {
|
||||
var r = Math.round(rgb[0] * 255);
|
||||
var g = Math.round(rgb[1] * 255);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue