diff --git a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/simple-query-common.js b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/simple-query-common.js index 7b0b9f3f9d..9adcda7b6f 100644 --- a/js/apps/system/aardvark/frontend/js/modules/org/arangodb/simple-query-common.js +++ b/js/apps/system/aardvark/frontend/js/modules/org/arangodb/simple-query-common.js @@ -1223,6 +1223,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 // -----------------------------------------------------------------------------