static/js/display.js
/**
 * Update gradient in size legend.
 * @function updateSizeGradient
 * @param {Object} mo - main object
 * @description The ladder-shaped gradient is achieved by css borders, which,
 * cannot accept percentage, thus need to be adjusted specifically.
 */
Update gradient in size legend.
@function updateSizeGradient
@param {Object} mo - main object
@description The ladder-shaped gradient is achieved by css borders, which,
cannot accept percentage, thus need to be adjusted specifically.
Update gradient in size legend . @function updateSizeGradient @param { Object } mo - main object @description The ladder - shaped gradient is achieved by css borders which cannot accept percentage thus need to be adjusted specifically .
function updateSizeGradient(mo) {
  const base = mo.view.size.base;
  const grad = byId('size-gradient');
  grad.style.height = base + 'px';
  grad.style.borderTopWidth = base + 'px';
  const rect = grad.getBoundingClientRect();
  grad.style.borderRightWidth = Math.floor(rect.right - rect.left) + 'px';
}
function updateSizeGradient ( mo ) { const base = mo . view . size . base ; const grad = byId ( 'size-gradient' ) ; grad . style . height = base + 'px' ; grad . style . borderTopWidth = base + 'px' ; const rect = grad . getBoundingClientRect ( ) ; grad . style . borderRightWidth = Math . floor ( rect . right - rect . left ) + 'px' ; }
Update gradient in size legend.
Update gradient in size legend .