code: function() {
  
              var newx = this.x;
              var newy = this.y;
              var newwidth = this.width;
              var newheight = this.height;
              if (this.width < 0) {
                  newx = this.x + this.width;
                  newwidth = -this.width;
              }
              if (this.height < 0) {
                  newy = this.y + this.height;
                  newheight = -this.height;
              }
              this.x = newx;
              this.y = newy;
              this.width = newwidth;
              this.height = newheight;
              return this;
          }
docs: Normalize the rectangle; i.e., make it so that it has a non-negative width and height. If width < 0 the function swaps the left and right corners, and it swaps the top and bottom corners if height < 0 like in http://qt-project.org/doc/qt-4.8/qrectf.html#normalized