Sha256: e402ecaf88bdadfe4b393aca60c30963dd74191ee99b9cb5ff202c45922bbad4

Contents?: true

Size: 826 Bytes

Versions: 1

Compression:

Stored size: 826 Bytes

Contents

/**
 * @constructor
 * @param {number} width
 * @param {number} height
 */
webfont.Size = function (width, height) {
  this.width = width;
  this.height = height;
};

/**
 * Returns true if this size equals other.
 *
 * @param {webfont.Size} other
 * @return {boolean}
 */
webfont.Size.prototype.equals = function (other) {
  return this.equalsWidth(other) && this.equalsHeight(other);
};

/**
 * Returns true if this.width equals other.width
 * @param {webfont.Size} other
 * @return {boolean}
 */
webfont.Size.prototype.equalsWidth = function (other) {
  return !!other && this.width == other.width;
};

/**
 * Returns true if this.height equals other.height
 * @param {webfont.Size} other
 * @return {boolean}
 */
webfont.Size.prototype.equalsHeight = function (other) {
  return !!other && this.height == other.height;
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webfontloader-1.3.0 src/core/size.js