static/js/display.js
/**
 * Update gradient in continuous color legend.
 * @function updateColorGradient
 * @param {Object} mo - main object
 */
Update gradient in continuous color legend.
@function updateColorGradient
@param {Object} mo - main object
Update gradient in continuous color legend . @function updateColorGradient @param { Object } mo - main object
function updateColorGradient(mo) {
  const ci = mo.view.color.i;
  if (!ci) return;
  if (mo.cols.types[ci] === 'cat') return;
  byId('color-gradient').style.backgroundImage =
    'linear-gradient(to right, ' + PALETTES[mo.view.contpal].map(
     x => '#' + x).join(', ') + ')';
}
function updateColorGradient ( mo ) { const ci = mo . view . color . i ; if ( ! ci ) return ; if ( mo . cols . types [ ci ] === 'cat' ) return ; byId ( 'color-gradient' ) . style . backgroundImage = 'linear-gradient(to right, ' + PALETTES [ mo . view . contpal ] . map ( x => '#' + x ) . join ( ', ' ) + ')' ; }
Update gradient in continuous color legend.
Update gradient in continuous color legend .