src/module.js
/**
     * makeArch makes quadratic arcs for the top and bottom path of a region
     * @param {Number} topBend can be positive or negative
     * @param {Number} bottomBend can be positive or negative
     */
makeArch makes quadratic arcs for the top and bottom path of a region
@param {Number} topBend can be positive or negative
@param {Number} bottomBend can be positive or negative
makeArch makes quadratic arcs for the top and bottom path of a region @param { Number } topBend can be positive or negative @param { Number } bottomBend can be positive or negative
function makeArch(topBend, bottomBend) {
      let toparc = createSVGElement('path');
      let bottomarc = createSVGElement('path');
      let bottomarcstr = '';
      let toparcstr = '';
      let arcMultiplier = 2;
      let toparchstrength = topBend || 0;
      let bottomarchstrength = bottomBend || 0;
      let topquad = {
        x0: region.bounds.x,
        y0: region.bounds.y,
        x1: (region.bounds.x + region.bounds.width / 2),
        y1: (region.bounds.y - region.bounds.height * toparchstrength * arcMultiplier),
        x2: (region.bounds.x + region.bounds.width),
        y2: (region.bounds.y)
      };
      let bottomquad = {
        x0: region.bounds.x,
        y0: (region.bounds.y + region.bounds.height),
        x1: (region.bounds.x + region.bounds.width / 2),
        y1: (region.bounds.y + region.bounds.height - region.bounds.height * bottomarchstrength * arcMultiplier),
        x2: (region.bounds.x + region.bounds.width),
        y2: (region.bounds.y + region.bounds.height)
      };
      toparcstr += 'M' + topquad.x0 + ',' + topquad.y0 + ' ';
      toparcstr += 'Q';
      toparcstr += topquad.x1 + ',' + topquad.y1 + ' ';
      toparcstr += topquad.x2 + ',' + topquad.y2;
      toparc.setAttribute('d', toparcstr);
      bottomarcstr += 'M' + bottomquad.x0 + ',' + bottomquad.y0 + ' ';
      bottomarcstr += 'Q';
      bottomarcstr += bottomquad.x1 + ',' + bottomquad.y1 + ' ';
      bottomarcstr += bottomquad.x2 + ',' + bottomquad.y2;
      bottomarc.setAttribute('d', bottomarcstr);
      region.topPath = toparc;
      region.bottomPath = bottomarc;
    }
function makeArch ( topBend , bottomBend ) { let toparc = createSVGElement ( 'path' ) ; let bottomarc = createSVGElement ( 'path' ) ; let bottomarcstr = '' ; let toparcstr = '' ; let arcMultiplier = 2 ; let toparchstrength = topBend || 0 ; let bottomarchstrength = bottomBend || 0 ; let topquad = { x0 : region . bounds . x , y0 : region . bounds . y , x1 : ( region . bounds . x + region . bounds . width / 2 ) , y1 : ( region . bounds . y - region . bounds . height * toparchstrength * arcMultiplier ) , x2 : ( region . bounds . x + region . bounds . width ) , y2 : ( region . bounds . y ) } ; let bottomquad = { x0 : region . bounds . x , y0 : ( region . bounds . y + region . bounds . height ) , x1 : ( region . bounds . x + region . bounds . width / 2 ) , y1 : ( region . bounds . y + region . bounds . height - region . bounds . height * bottomarchstrength * arcMultiplier ) , x2 : ( region . bounds . x + region . bounds . width ) , y2 : ( region . bounds . y + region . bounds . height ) } ; toparcstr += 'M' + topquad . x0 + ',' + topquad . y0 + ' ' ; toparcstr += 'Q' ; toparcstr += topquad . x1 + ',' + topquad . y1 + ' ' ; toparcstr += topquad . x2 + ',' + topquad . y2 ; toparc . setAttribute ( 'd' , toparcstr ) ; bottomarcstr += 'M' + bottomquad . x0 + ',' + bottomquad . y0 + ' ' ; bottomarcstr += 'Q' ; bottomarcstr += bottomquad . x1 + ',' + bottomquad . y1 + ' ' ; bottomarcstr += bottomquad . x2 + ',' + bottomquad . y2 ; bottomarc . setAttribute ( 'd' , bottomarcstr ) ; region . topPath = toparc ; region . bottomPath = bottomarc ; }
makeArch makes quadratic arcs for the top and bottom path of a region
 @param {Number} topBend can be positive or negative
 @param {Number} bottomBend can be positive or negative
makeArch makes quadratic arcs for the top and bottom path of a region @param { Number } topBend can be positive or negative @param { Number } bottomBend can be positive or negative