r94549 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94548‎ | r94549 | r94550 >
Date:18:57, 15 August 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added documentation and direct support for line in position
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.Flow.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Position.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Position.js
@@ -8,14 +8,17 @@
99 * @param left {Integer} Horizontal position
1010 * @param top {Integer} Vertical top position
1111 * @param bottom {Integer} Vertical bottom position of bottom (optional, default: top)
 12+ * @param line {Integer} Rendered line index (optional, default: undefined)
1213 * @property left {Integer} Horizontal position
1314 * @property top {Integer} Vertical top position
1415 * @property bottom {Integer} Vertical bottom position of bottom
 16+ * @property line {Integer} Rendered line index
1517 */
16 -es.Position = function( left, top, bottom ) {
 18+es.Position = function( left, top, bottom, line ) {
1719 this.left = left || 0;
1820 this.top = top || 0;
1921 this.bottom = bottom || this.top;
 22+ this.line = line;
2023 };
2124
2225 /* Static Methods */
Index: trunk/parsers/wikidom/lib/es/es.Flow.js
@@ -125,7 +125,8 @@
126126 * left, top and bottom positions, which could be used to draw a cursor, highlighting, etc.
127127 *
128128 * @param offset {Integer} Offset within content
129 - * @return {Object} Object containing left, top and bottom properties, each positions in pixels
 129+ * @return {Object} Object containing left, top and bottom properties, each positions in pixels as
 130+ * well as a line index
130131 */
131132 es.Flow.prototype.getPosition = function( offset ) {
132133 /*

Status & tagging log