js monitor screen orientation does not monitor how the first default

this.supportOrientation = typeof window.orientation === 'number'; 

//  检查屏幕方向
    checkScreenOrientation() {
        if (this.supportOrientation) {
            if (window.orientation === 0) {
                this.screenOrientation = 'portrait';
            }
            if (window.orientation === 90 || window.orientation === -90) {
                this.screenOrientation = 'landscape';
            }
        } else {
            this? .screenOrientation = (window.innerWidth> window.innerHeight) 'Landscape': 'Portrait' ; 
        } 
       // IF (this.orientationFlag) {// is true when the exchange screen aspect 
            the let TEMP = the this .bodyWidth;
        / /      this.bodyWidth = this.bodyHeight; 
        //     this.bodyHeight = TEMP; 
        // } the else { 
         //    this.orientationFlag = to true; 
        // } 
IF ( the this .orientationFlag) { 
         imageMof (); // reset the image height 
      } the else {
          the this .orientationFlag = to true ;  
      }
}

 

It sometimes there is a demand to re-execute a rendering function when the screen orientation changes, to get the actual width and height of the changed direction, but the first loads of execution function to execute in other places, this time you can add a flag state value, default is false, the detected direction when the first time and then to change true.

There is a good recommendation related articles: https://div.io/topic/1828

Beijing to push a large number of jobs in the Guangzhou strikes

My company is hiring positions:

Corporate welfare: 15-16 new, three meals a day + tea ........................

The main backend language: go, python

The main sectors: mobile advertising

Beijing:

Senior back-end development, product director, launch manager, senior front-end, front-end architect, senior algorithm, the server testing, product manager, ios technical support engineers, cloud computing pre-sales engineers, senior big data development, Andrews advanced development, overseas advertising promotion (increase of advanced optimization division), senior unity and development, Trade Commissioner (Japanese / Korean), organizational development OD.

Guangzhou:

Video creative division, advanced optimization division, HRBP, Senior HRBP, product director, financial project management, game investment manager, programmed delivery, advanced front-end, advanced client development, senior graphic design, short video director, advanced testing, advanced algorithms senior algorithm, algorithm experts.

 Interested private letter to me ~

Guess you like

Origin www.cnblogs.com/beileixinqing/p/11734766.html