r97955 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97954‎ | r97955 | r97956 >
Date:20:59, 23 September 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added add and subtract functions to es.Position
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/es.Position.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/es.Position.js
@@ -59,6 +59,30 @@
6060 /* Methods */
6161
6262 /**
 63+ * Adds the values of a given position to this one.
 64+ *
 65+ * @method
 66+ * @param position {es.Position} Position to add values from
 67+ */
 68+es.Position.prototype.add = function( position ) {
 69+ this.top += position.top;
 70+ this.bottom += position.bottom;
 71+ this.left += position.left;
 72+};
 73+
 74+/**
 75+ * Subtracts the values of a given position to this one.
 76+ *
 77+ * @method
 78+ * @param position {es.Position} Position to subtract values from
 79+ */
 80+es.Position.prototype.subtract = function( position ) {
 81+ this.top -= position.top;
 82+ this.bottom -= position.bottom;
 83+ this.left -= position.left;
 84+};
 85+
 86+/**
6387 * Checks if this position is the same as another one.
6488 *
6589 * @method

Status & tagging log