Class Index | File Index

Classes


Class LazyArray


Defined in: LazyArray.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
LazyArray(lazyArrayParams, baseUrl)
Construct a new LazyArray, which partially loads large JSON arrays.
Method Summary
Method Attributes Method Name and Description
 
index(i, callback, param)
call the callback on one element of the array
 
range(start, end, callback, postFun, param)
call the callback on each element in the range [start, end]
Class Detail
LazyArray(lazyArrayParams, baseUrl)
Construct a new LazyArray, which partially loads large JSON arrays.
Parameters:
lazyArrayParams
{Object} as:
  • urlTemplate - for each lazily-loaded array chunk, the chunk number will get substituted for {chunk} in this template, and the result will beused as the URL of the JSON for that array chunk
  • length - length of the overall array
  • chunkSize - the size of each array chunk
baseUrl
Method Detail
index(i, callback, param)
call the callback on one element of the array
Parameters:
i
index
callback
callback, gets called with (i, value, param)
param
(optional) callback will get this as its last parameter

range(start, end, callback, postFun, param)
call the callback on each element in the range [start, end]
Parameters:
start
index of first element to call the callback on
end
index of last element to call the callback on
callback
callback, gets called with (i, value, param)
postFun
(optional) callback that gets called when callback has been run on every element in the range
param
(optional) callback will get this as its last parameter

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 14 2012 17:43:46 GMT-0400 (EDT)