2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
8 (function ($, Drupal) {
10 callback: function callback(context, settings, form, farb, height, width) {
14 form.find('.color-preview').css('backgroundColor', form.find('.color-palette input[name="palette[base]"]').val());
16 form.find('#text').css('color', form.find('.color-palette input[name="palette[text]"]').val());
17 form.find('#text a, #text h2').css('color', form.find('.color-palette input[name="palette[link]"]').val());
19 function gradientLineColor(i, element) {
20 for (var k in accum) {
21 if (accum.hasOwnProperty(k)) {
25 element.style.backgroundColor = farb.pack(accum);
28 var color_start = void 0;
29 var color_end = void 0;
30 for (var i in settings.gradients) {
31 if (settings.gradients.hasOwnProperty(i)) {
32 color_start = farb.unpack(form.find('.color-palette input[name="palette[' + settings.gradients[i].colors[0] + ']"]').val());
33 color_end = farb.unpack(form.find('.color-palette input[name="palette[' + settings.gradients[i].colors[1] + ']"]').val());
34 if (color_start && color_end) {
36 for (var j in color_start) {
37 if (color_start.hasOwnProperty(j)) {
38 delta[j] = (color_end[j] - color_start[j]) / (settings.gradients[i].vertical ? height[i] : width[i]);
43 form.find('#gradient-' + i + ' > div').each(gradientLineColor);