From 67b796d88b503452760b29ea4c5d65b0c1aa52a4 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 9 Apr 2008 12:33:26 +0000 Subject: [PATCH] Dividing base types into namespaces (docs only). (see #1504) git-svn-id: http://svn.openlayers.org/trunk/openlayers@6829 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/BaseTypes.js | 64 ++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index 939753efe4..b9e2cbc054 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -17,16 +17,14 @@ * OpenLayers custom string, number and function functions are described here. */ -/********************* - * * - * STRING * - * * - *********************/ - +/** + * Namespace: OpenLayers.String + * Contains convenience functions for string manipulation. + */ OpenLayers.String = { /** - * APIFunction: OpenLayers.String.startsWith + * APIFunction: startsWith * Test whether a string starts with another string. * * Parameters: @@ -41,7 +39,7 @@ OpenLayers.String = { }, /** - * APIFunction: OpenLayers.String.contains + * APIFunction: contains * Test whether a string contains another string. * * Parameters: @@ -56,7 +54,7 @@ OpenLayers.String = { }, /** - * APIFunction: OpenLayers.String.trim + * APIFunction: trim * Removes leading and trailing whitespace characters from a string. * * Parameters: @@ -72,7 +70,7 @@ OpenLayers.String = { }, /** - * APIFunction: OpenLayers.String.camelize + * APIFunction: camelize * Camel-case a hyphenated string. * Ex. "chicken-head" becomes "chickenHead", and * "-chicken-head" becomes "ChickenHead". @@ -94,7 +92,7 @@ OpenLayers.String = { }, /** - * APIFunction: OpenLayers.String.format + * APIFunction: format * Given a string with tokens in the form ${token}, return a string * with tokens replaced with properties from the given context * object. Represent a literal "${" by doubling it, e.g. "${${". @@ -209,28 +207,26 @@ if (!String.prototype.camelize) { }; } -/********************* - * * - * NUMBER * - * * - *********************/ - +/** + * Namespace: OpenLayers.Number + * Contains convenience functions for manipulating numbers. + */ OpenLayers.Number = { /** - * Property: OpenLayers.Number.decimalSeparator + * Property: decimalSeparator * Decimal separator to use when formatting numbers. */ decimalSeparator: ".", /** - * Property: OpenLayers.Number.thousandsSeparator + * Property: thousandsSeparator * Thousands separator to use when formatting numbers. */ thousandsSeparator: ",", /** - * APIFunction: OpenLayers.Number.limitSigDigs + * APIFunction: limitSigDigs * Limit the number of significant digits on a float. * * Parameters: @@ -250,7 +246,7 @@ OpenLayers.Number = { }, /** - * APIFunction: OpenLayers.Number.format + * APIFunction: format * Formats a number for output. * * Parameters: @@ -324,15 +320,13 @@ if (!Number.prototype.limitSigDigs) { }; } -/********************* - * * - * FUNCTION * - * * - *********************/ - +/** + * Namespace: OpenLayers.Function + * Contains convenience functions for function manipulation. + */ OpenLayers.Function = { /** - * APIFunction: OpenLayers.Function.bind + * APIFunction: bind * Bind a function to an object. Method to easily create closures with * 'this' altered. * @@ -357,7 +351,7 @@ OpenLayers.Function = { }, /** - * APIFunction: OpenLayers.Function.bindAsEventListener + * APIFunction: bindAsEventListener * Bind a function to an object, and configure it to receive the event * object as first parameter when called. * @@ -416,16 +410,14 @@ if (!Function.prototype.bindAsEventListener) { }; } -/********************* - * * - * ARRAY * - * * - *********************/ - +/** + * Namespace: OpenLayers.Array + * Contains convenience functions for array manipulation. + */ OpenLayers.Array = { /** - * APIMethod: OpenLayers.Array.filter + * APIMethod: filter * Filter an array. Provides the functionality of the * Array.prototype.filter extension to the ECMA-262 standard. Where * available, Array.prototype.filter will be used.