From d290dd1de61e825728a896622ec62dfadbba7650 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 17 Nov 2014 16:37:04 +0100 Subject: [PATCH] added derived file --- .../org/arangodb/simple-query-common.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 // -----------------------------------------------------------------------------