function checkSize(arr) {
    var counter = 0,
      flag = false;

    for (var i=0; i<arr.length; i++) {
      if (arr[i].options.size) {
        counter += arr[i].options.size;
      }
    }

    if (counter > 1) {
      return false;
    } else {
      if (counter === 0) {
        return false;
      } else {
        return counter.toFixed(2);
      }
    }
  }
/** checking if circles have size parameter */
checking if circles have size parameter
checking if circles have size parameter
function checkSize(arr) {
    var counter = 0,
      flag = false;
    for (var i=0; i<arr.length; i++) {
      if (arr[i].options.size) {
        counter += arr[i].options.size;
      }
    }
    if (counter > 1) {
      return false;
    } else {
      if (counter === 0) {
        return false;
      } else {
        return counter.toFixed(2);
      }
    }
  }
function checkSize ( arr ) { var counter = 0 , flag = false ; for ( var i = 0 ; i < arr . length ; i ++ ) { if ( arr [ i ] . options . size ) { counter += arr [ i ] . options . size ; } } if ( counter > 1 ) { return false ; } else { if ( counter === 0 ) { return false ; } else { return counter . toFixed ( 2 ) ; } } }
checking if circles have size parameter
checking if circles have size parameter