adjust ( x, y, w, h ) {
    let adjustToCenter = false;

    if ( typeof x !== 'number' ) {
      adjustToCenter = true;
      x = 0;
    }

    if ( typeof y !== 'number' ) {
      adjustToCenter = true;
      y = 0;
    }

    if ( typeof w !== 'number' || w <= 0 ) {
      adjustToCenter = true;
      w = 800;
    }

    if ( typeof h !== 'number' || h <= 0 ) {
      adjustToCenter = true;
      h = 600;
    }

    let display = Electron.screen.getDisplayMatching( { x: x, y: y, width: w, height: h } );
    this.nativeWin.setSize(w,h);
    this.nativeWin.setPosition( display.workArea.x, display.workArea.y );

    if ( adjustToCenter ) {
      this.nativeWin.center();
    } else {
      this.nativeWin.setPosition( x, y );
    }
  }
/**
   * @method adjust
   * @param {number} x
   * @param {number} y
   * @param {number} w
   * @param {number} h
   *
   * Try to adjust the window to fit the position and size we give
   */


Try to adjust the window to fit the position and size we give
Try to adjust the window to fit the position and size we give
adjust ( x, y, w, h ) {
    let adjustToCenter = false;
    if ( typeof x !== 'number' ) {
      adjustToCenter = true;
      x = 0;
    }
    if ( typeof y !== 'number' ) {
      adjustToCenter = true;
      y = 0;
    }
    if ( typeof w !== 'number' || w <= 0 ) {
      adjustToCenter = true;
      w = 800;
    }
    if ( typeof h !== 'number' || h <= 0 ) {
      adjustToCenter = true;
      h = 600;
    }
    let display = Electron.screen.getDisplayMatching( { x: x, y: y, width: w, height: h } );
    this.nativeWin.setSize(w,h);
    this.nativeWin.setPosition( display.workArea.x, display.workArea.y );
    if ( adjustToCenter ) {
      this.nativeWin.center();
    } else {
      this.nativeWin.setPosition( x, y );
    }
  }
adjust ( x , y , w , h ) { let adjustToCenter = false ; if ( typeof x !== 'number' ) { adjustToCenter = true ; x = 0 ; } if ( typeof y !== 'number' ) { adjustToCenter = true ; y = 0 ; } if ( typeof w !== 'number' || w <= 0 ) { adjustToCenter = true ; w = 800 ; } if ( typeof h !== 'number' || h <= 0 ) { adjustToCenter = true ; h = 600 ; } let display = Electron . screen . getDisplayMatching ( { x : x , y : y , width : w , height : h } ) ; this . nativeWin . setSize ( w , h ) ; this . nativeWin . setPosition ( display . workArea . x , display . workArea . y ) ; if ( adjustToCenter ) { this . nativeWin . center ( ) ; } else { this . nativeWin . setPosition ( x , y ) ; } }
@method adjust
 @param {number} x
 @param {number} y
 @param {number} w
 @param {number} h
@method adjust @param { number } x @param { number } y @param { number } w @param { number } h