Skip to content

Commit 16957fd

Browse files
committed
Fixed whitespace
1 parent 8039c59 commit 16957fd

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

jquery.minicolors.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
'</div>' +
205205
'</div>'
206206
);
207-
207+
208208
// The swatch
209209
if( !settings.inline ) {
210210
input.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>');
@@ -217,7 +217,7 @@
217217
// Prevent text selection in IE
218218
panel = input.parent().find('.minicolors-panel');
219219
panel.on('selectstart', function() { return false; }).end();
220-
220+
221221
// Swatches
222222
if (settings.swatches && settings.swatches.length !== 0) {
223223
if (settings.swatches.length > 7) {
@@ -239,7 +239,7 @@
239239
});
240240
settings.swatches[i] = swatch;
241241
}
242-
242+
243243
}
244244

245245
// Inline controls
@@ -495,14 +495,14 @@
495495
break;
496496

497497
}
498-
498+
499499
// Handle opacity
500500
if( settings.opacity ) {
501501
opacity = parseFloat(1 - (opacityPos.y / opacitySlider.height())).toFixed(2);
502502
} else {
503503
opacity = 1;
504504
}
505-
505+
506506
updateInput(input, hex, opacity);
507507
}
508508
else {
@@ -516,31 +516,31 @@
516516
doChange(input, hex, opacity);
517517
}
518518
}
519-
519+
520520
// Sets the value of the input and does the appropriate conversions
521521
// to respect settings, also updates the swatch
522522
function updateInput(input, value, opacity) {
523523
var rgb,
524-
524+
525525
// Helpful references
526526
minicolors = input.parent(),
527527
settings = input.data('minicolors-settings'),
528528
swatch = minicolors.find('.minicolors-input-swatch');
529-
529+
530530
if( settings.opacity ) input.attr('data-opacity', opacity);
531-
531+
532532
// Set color string
533533
if( settings.format === 'rgb' ) {
534534
// Returns RGB(A) string
535-
535+
536536
// Checks for input format and does the conversion
537537
if ( isRgb(value) ) {
538538
rgb = parseRgb(value, true);
539539
}
540540
else {
541541
rgb = hex2rgb(parseHex(value, true));
542542
}
543-
543+
544544
opacity = input.attr('data-opacity') === '' ? 1 : keepWithin( parseFloat( input.attr('data-opacity') ).toFixed(2), 0, 1 );
545545
if( isNaN( opacity ) || !settings.opacity ) opacity = 1;
546546

@@ -553,18 +553,18 @@
553553
}
554554
} else {
555555
// Returns hex color
556-
556+
557557
// Checks for input format and does the conversion
558558
if ( isRgb(value) ) {
559559
value = rgbString2hex(value);
560560
}
561-
561+
562562
value = convertCase( value, settings.letterCase );
563563
}
564564

565565
// Update value from picker
566566
input.val( value );
567-
567+
568568
// Set swatch color
569569
swatch.find('span').css({
570570
backgroundColor: value,
@@ -750,7 +750,7 @@
750750

751751
// Only run if it actually changed
752752
if( !lastChange || lastChange.value !== value || lastChange.opacity !== opacity ) {
753-
753+
754754
// Remember last-changed value
755755
input.data('minicolors-lastChange', {
756756
value: value,
@@ -772,7 +772,7 @@
772772
break;
773773
}
774774
}
775-
775+
776776
input.parent().find('.minicolors-swatches .minicolors-swatch').removeClass('selected');
777777
if (i !== -1) {
778778
input.parent().find('.minicolors-swatches .minicolors-swatch').eq(i).addClass('selected');

0 commit comments

Comments
 (0)