jspanel/dist/jspanel.js
// normalizes values for option.maximizedMargin and containment of dragit/resizeit
normalizes values for option.maximizedMargin and containment of dragit/resizeit
normalizes values for option . maximizedMargin and containment of dragit / resizeit
function pOcontainment(arg) {
    var value = arg;
    if (typeof arg === 'function') {
      value = arg();
    }
    if (typeof value === 'number') {
      return [value, value, value, value];
    } else if (Array.isArray(value)) {
      if (value.length === 1) {
        return [value[0], value[0], value[0], value[0]];
      } else if (value.length === 2) {
        return value.concat(value);
      } else if (value.length === 3) {
        value[3] = value[1];
      }
    }
    return value; 
  }
function pOcontainment ( arg ) { var value = arg ; if ( typeof arg === 'function' ) { value = arg ( ) ; } if ( typeof value === 'number' ) { return [ value , value , value , value ] ; } else if ( Array . isArray ( value ) ) { if ( value . length === 1 ) { return [ value [ 0 ] , value [ 0 ] , value [ 0 ] , value [ 0 ] ] ; } else if ( value . length === 2 ) { return value . concat ( value ) ; } else if ( value . length === 3 ) { value [ 3 ] = value [ 1 ] ; } } return value ; }
normalizes values for option.maximizedMargin and containment of dragit/resizeit
normalizes values for option . maximizedMargin and containment of dragit / resizeit
// value: 20 => value: [20, 20, 20, 20] // value: [20] => value: [20, 20, 20, 20] // value: [20, 40] => value: [20, 40, 20, 40] // assumed to be array with 4 values