diff --git a/js/common/modules/org/arangodb/simple-query-common.js b/js/common/modules/org/arangodb/simple-query-common.js index 80db052071..a5cad4d797 100644 --- a/js/common/modules/org/arangodb/simple-query-common.js +++ b/js/common/modules/org/arangodb/simple-query-common.js @@ -1222,6 +1222,25 @@ SimpleQueryWithin.prototype._PRINT = function (context) { context.output += text; }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds the distance attribute +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryWithin.prototype.distance = function (attribute) { + var clone; + + clone = this.clone(); + + if (attribute) { + clone._distance = attribute; + } + else { + clone._distance = "distance"; + } + + return clone; +}; + // ----------------------------------------------------------------------------- // --SECTION-- SIMPLE QUERY WITHINRECTANGLE // -----------------------------------------------------------------------------