From f7e2d52e5c2784bbae031438ee4a934be2007a29 Mon Sep 17 00:00:00 2001
From: xjm <xjm@65776.no-reply.drupal.org>
Date: Fri, 1 Dec 2017 13:28:46 -0600
Subject: [PATCH] Revert "Issue #2927228 by drpal, dawehner: 2/3 JS codestyle:
 camelcase"

This reverts commit 27253f7214dcccae0bce11bd48113f795613d912.
---
 core/modules/color/color.es6.js   | 12 ++++++------
 core/modules/color/color.js       |  6 +++---
 core/modules/color/preview.es6.js | 16 ++++++++--------
 core/modules/color/preview.js     | 16 ++++++++--------
 4 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/core/modules/color/color.es6.js b/core/modules/color/color.es6.js
index 6035d3f1aae1..4cc26ec855bb 100644
--- a/core/modules/color/color.es6.js
+++ b/core/modules/color/color.es6.js
@@ -85,10 +85,10 @@
        * This algorithm ensures relative ordering on the saturation and
        * luminance axes is preserved, and performs a simple hue shift.
        *
-       * It is also symmetrical. If: shiftColor(c, a, b) === d, then
-       * shiftColor(d, b, a) === c.
+       * It is also symmetrical. If: shift_color(c, a, b) === d, then
+       * shift_color(d, b, a) === c.
        *
-       * @function Drupal.color~shiftColor
+       * @function Drupal.color~shift_color
        *
        * @param {string} given
        *   A hex color code to shift.
@@ -100,7 +100,7 @@
        * @return {string}
        *   A hex color, shifted.
        */
-      function shiftColor(given, ref1, ref2) {
+      function shift_color(given, ref1, ref2) {
         let d;
         // Convert to HSL.
         given = farb.RGBToHSL(farb.unpack(given));
@@ -171,14 +171,14 @@
               if (!locks[j - 1] || $(locks[j - 1]).is('.is-unlocked')) {
                 break;
               }
-              matched = shiftColor(color, reference[input.key], reference[inputs[j].key]);
+              matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
               callback(inputs[j], matched, false);
             }
             for (j = i - 1; ; --j) {
               if (!locks[j] || $(locks[j]).is('.is-unlocked')) {
                 break;
               }
-              matched = shiftColor(color, reference[input.key], reference[inputs[j].key]);
+              matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
               callback(inputs[j], matched, false);
             }
 
diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index d45aaa264f6d..63cd2db46fde 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -61,7 +61,7 @@
         Drupal.color.callback(context, settings, form, farb, height, width);
       }
 
-      function shiftColor(given, ref1, ref2) {
+      function shift_color(given, ref1, ref2) {
         var d = void 0;
 
         given = farb.RGBToHSL(farb.unpack(given));
@@ -110,14 +110,14 @@
               if (!locks[j - 1] || $(locks[j - 1]).is('.is-unlocked')) {
                 break;
               }
-              matched = shiftColor(color, reference[input.key], reference[inputs[j].key]);
+              matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
               callback(inputs[j], matched, false);
             }
             for (j = i - 1;; --j) {
               if (!locks[j] || $(locks[j]).is('.is-unlocked')) {
                 break;
               }
-              matched = shiftColor(color, reference[input.key], reference[inputs[j].key]);
+              matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
               callback(inputs[j], matched, false);
             }
 
diff --git a/core/modules/color/preview.es6.js b/core/modules/color/preview.es6.js
index ac4486038a18..a2f41c6fc23c 100644
--- a/core/modules/color/preview.es6.js
+++ b/core/modules/color/preview.es6.js
@@ -45,17 +45,17 @@
       }
 
       // Set up gradients if there are some.
-      let colorStart;
-      let colorEnd;
+      let color_start;
+      let color_end;
       Object.keys(settings.gradients).forEach((i) => {
-        colorStart = farb.unpack(form.find(`.color-palette input[name="palette[${settings.gradients[i].colors[0]}]"]`).val());
-        colorEnd = farb.unpack(form.find(`.color-palette input[name="palette[${settings.gradients[i].colors[1]}]"]`).val());
-        if (colorStart && colorEnd) {
+        color_start = farb.unpack(form.find(`.color-palette input[name="palette[${settings.gradients[i].colors[0]}]"]`).val());
+        color_end = farb.unpack(form.find(`.color-palette input[name="palette[${settings.gradients[i].colors[1]}]"]`).val());
+        if (color_start && color_end) {
           delta = [];
-          Object.keys(colorStart).forEach((colorStartKey) => {
-            delta[colorStartKey] = (colorEnd[colorStartKey] - colorStart[colorStartKey]) / (settings.gradients[i].vertical ? height[i] : width[i]);
+          Object.keys(color_start).forEach((colorStartKey) => {
+            delta[colorStartKey] = (color_end[colorStartKey] - color_start[colorStartKey]) / (settings.gradients[i].vertical ? height[i] : width[i]);
           });
-          accum = colorStart;
+          accum = color_start;
           // Render gradient lines.
           form.find(`#gradient-${i} > div`).each(gradientLineColor);
         }
diff --git a/core/modules/color/preview.js b/core/modules/color/preview.js
index 49ee58f00ad2..a0cb1d3c4ea3 100644
--- a/core/modules/color/preview.js
+++ b/core/modules/color/preview.js
@@ -23,17 +23,17 @@
         element.style.backgroundColor = farb.pack(accum);
       }
 
-      var colorStart = void 0;
-      var colorEnd = void 0;
+      var color_start = void 0;
+      var color_end = void 0;
       Object.keys(settings.gradients).forEach(function (i) {
-        colorStart = farb.unpack(form.find('.color-palette input[name="palette[' + settings.gradients[i].colors[0] + ']"]').val());
-        colorEnd = farb.unpack(form.find('.color-palette input[name="palette[' + settings.gradients[i].colors[1] + ']"]').val());
-        if (colorStart && colorEnd) {
+        color_start = farb.unpack(form.find('.color-palette input[name="palette[' + settings.gradients[i].colors[0] + ']"]').val());
+        color_end = farb.unpack(form.find('.color-palette input[name="palette[' + settings.gradients[i].colors[1] + ']"]').val());
+        if (color_start && color_end) {
           delta = [];
-          Object.keys(colorStart).forEach(function (colorStartKey) {
-            delta[colorStartKey] = (colorEnd[colorStartKey] - colorStart[colorStartKey]) / (settings.gradients[i].vertical ? height[i] : width[i]);
+          Object.keys(color_start).forEach(function (colorStartKey) {
+            delta[colorStartKey] = (color_end[colorStartKey] - color_start[colorStartKey]) / (settings.gradients[i].vertical ? height[i] : width[i]);
           });
-          accum = colorStart;
+          accum = color_start;
 
           form.find('#gradient-' + i + ' > div').each(gradientLineColor);
         }
-- 
GitLab