Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
fix wrong merge
Commit Description:
fix wrong merge
/**
* Represents a glyph bounding box
*/
export default class BBox {
constructor ( minX = Infinity , minY = Infinity , maxX = - Infinity , maxY = - Infinity ) {
/**
* The minimum X position in the bounding box
* @type {number}
*/
this . minX = minX ;
/**
* The minimum Y position in the bounding box
* @type {number}
*/
this . minY = minY ;
/**
* The maxmimum X position in the bounding box
* @type {number}
*/
this . maxX = maxX ;
/**
* The maxmimum Y position in the bounding box
* @type {number}
*/
this . maxY = maxY ;
}
/**
* The width of the bounding box
* @type {number}
*/
get width () {
return this . maxX - this . minX ;
}
/**
* The height of the bounding box
* @type {number}
*/
get height () {
return this . maxY - this . minY ;
}
addPoint ( x , y ) {
if ( Math . abs ( x ) !== Infinity ) {
if ( x < this . minX ) {
this . minX = x ;
}
if ( x > this . maxX ) {
this . maxX = x ;
}
}
if ( Math . abs ( y ) !== Infinity ) {
if ( y < this . minY ) {
this . minY = y ;
}
if ( y > this . maxY ) {
this . maxY = y ;
}
}
}
copy () {
return new BBox ( this . minX , this . minY , this . maxX , this . maxY );
}
}
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings