Scroller.oDefaults.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  5. <title>Namespace: oDefaults - documentation</title>
  6. <style type="text/css" media="screen">
  7. @import "media/css/doc.css";
  8. @import "media/css/shCore.css";
  9. @import "media/css/shThemeDataTables.css";
  10. </style>
  11. <script type="text/javascript" src="media/js/shCore.js"></script>
  12. <script type="text/javascript" src="media/js/shBrushJScript.js"></script>
  13. <script type="text/javascript" src="media/js/jquery.js"></script>
  14. <script type="text/javascript" src="media/js/doc.js"></script>
  15. </head>
  16. <body>
  17. <div class="fw_container">
  18. <a name="top"></a>
  19. <div class="fw_header">
  20. <h1 class="page-title">Namespace: oDefaults</h1>
  21. <h2 class="ancestors">Ancestry: <span class="ancestors"><a href="Scroller.html">Scroller</a>.</span> » oDefaults</h2>
  22. <div class="page-info">
  23. Scroller v1.1.0 documentation
  24. </div>
  25. </div>
  26. <div class="fw_nav">
  27. <h2>Navigation</h2>
  28. <ul>
  29. <li><a href="#top">Overview</a></li>
  30. <li><a href="#summary">Summary</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Classes (0)</td><td>Namespaces (0)</td></tr><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (6)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li><li><a href="#details">Details</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (6)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li></ul>
  31. <div style="margin-top: 10px;">
  32. <input type="hidden" name="show_private" value="0">
  33. <span id="private_label">Hiding</span> private elements
  34. (<a id="private_toggle" href="">toggle</a>)
  35. </span>
  36. </div>
  37. <div>
  38. <input type="hidden" name="show_extended" value="1">
  39. <span id="extended_label">Showing</span> extended elements
  40. (<a id="extended_toggle" href="">toggle</a>)
  41. </span>
  42. </div>
  43. </div>
  44. <div class="fw_content">
  45. <a name="overview"></a>
  46. <div class="doc_overview">
  47. <div class="nav_blocker"></div>
  48. <p>Scroller default settings for initialisation</p><dl class="details">
  49. </dl>
  50. </div>
  51. <div class="doc_summary">
  52. <a name="summary"></a>
  53. <h2>Summary</h2>
  54. <div class="doc_group"><a name="summary_properties_static"></a><h3 class="subsection-title">Properties - static</h3>
  55. <dl>
  56. <dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#boundaryScale">boundaryScale</a></span><span class="type-sig"><span class="type-signature"> :float</span></span></dt><dd class=" even"><p>Scroller uses the boundary scaling factor to decide when to redraw the table - which it
  57. typically does before you reach the end of the currently loaded data set (in order to
  58. allow the data to look continuous to a user scrolling through the data). If given as 0
  59. then the table will be redrawn whenever the viewport is scrolled, while 1 would not
  60. redraw the table until the currently loaded data has all been shown. You will want
  61. something in the middle - the default factor of 0.5 is usually suitable.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#displayBuffer">displayBuffer</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>The display buffer is what Scroller uses to calculate how many rows it should pre-fetch
  62. for scrolling. Scroller automatically adjusts DataTables' display length to pre-fetch
  63. rows that will be shown in "near scrolling" (i.e. just beyond the current display area).
  64. The value is based upon the number of rows that can be displayed in the viewport (i.e.
  65. a value of 1), and will apply the display range to records before before and after the
  66. current viewport - i.e. a factor of 3 will allow Scroller to pre-fetch 1 viewport's worth
  67. of rows before the current viewport, the current viewport's rows and 1 viewport's worth
  68. of rows after the current viewport. Adjusting this value can be useful for ensuring
  69. smooth scrolling based on your data set.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#loadingIndicator">loadingIndicator</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Show (or not) the loading element in the background of the table. Note that you should
  70. include the dataTables.scroller.css file for this to be displayed correctly.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#rowHeight">rowHeight</a></span><span class="type-sig"><span class="type-signature"> :int|string</span></span></dt><dd class=" odd"><p>Scroller will attempt to automatically calculate the height of rows for it's internal
  71. calculations. However the height that is used can be overridden using this parameter.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#serverWait">serverWait</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" even"><p>When using server-side processing, Scroller will wait a small amount of time to allow
  72. the scrolling to finish before requesting more data from the server. This prevents
  73. you from DoSing your own server! The wait time can be configured by this parameter.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#trace">trace</a></span><span class="type-sig"><span class="type-signature"> :bool</span></span></dt><dd class=" odd"><p>Indicate if Scroller show show trace information on the console or not. This can be
  74. useful when debugging Scroller or if just curious as to what it is doing, but should
  75. be turned off for production.</p></dd>
  76. </dl></div>
  77. </div>
  78. <div class="doc_details">
  79. <a name="details"></a>
  80. <h2>Details</h2>
  81. <div class="doc_group"><a name="details_properties"></a><h3 class="subsection-title">Properties - static</h3>
  82. <dl>
  83. <dt class=" even"><a name="boundaryScale"></a><a name="boundaryScale_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#boundaryScale">boundaryScale</a></span><span class="type-sig"><span class="type-signature"> :float</span></span></dt><dd class=" even"><p>Scroller uses the boundary scaling factor to decide when to redraw the table - which it
  84. typically does before you reach the end of the currently loaded data set (in order to
  85. allow the data to look continuous to a user scrolling through the data). If given as 0
  86. then the table will be redrawn whenever the viewport is scrolled, while 1 would not
  87. redraw the table until the currently loaded data has all been shown. You will want
  88. something in the middle - the default factor of 0.5 is usually suitable.</p><div class="collapse_details"><dl class="details">
  89. </dl>
  90. <h5>Example</h5>
  91. <div class="example-code">
  92. <pre class="brush: js"> var oTable = $('#example').dataTable( {
  93. "sScrollY": "200px",
  94. "sDom": "frtiS",
  95. "bDeferRender": true,
  96. "oScroller": {
  97. "boundaryScale": 0.75
  98. }
  99. } );</pre>
  100. </div>
  101. </div></dd><dt class=" odd"><a name="displayBuffer"></a><a name="displayBuffer_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#displayBuffer">displayBuffer</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>The display buffer is what Scroller uses to calculate how many rows it should pre-fetch
  102. for scrolling. Scroller automatically adjusts DataTables' display length to pre-fetch
  103. rows that will be shown in "near scrolling" (i.e. just beyond the current display area).
  104. The value is based upon the number of rows that can be displayed in the viewport (i.e.
  105. a value of 1), and will apply the display range to records before before and after the
  106. current viewport - i.e. a factor of 3 will allow Scroller to pre-fetch 1 viewport's worth
  107. of rows before the current viewport, the current viewport's rows and 1 viewport's worth
  108. of rows after the current viewport. Adjusting this value can be useful for ensuring
  109. smooth scrolling based on your data set.</p><div class="collapse_details"><dl class="details">
  110. </dl>
  111. <h5>Example</h5>
  112. <div class="example-code">
  113. <pre class="brush: js"> var oTable = $('#example').dataTable( {
  114. "sScrollY": "200px",
  115. "sDom": "frtiS",
  116. "bDeferRender": true,
  117. "oScroller": {
  118. "displayBuffer": 10
  119. }
  120. } );</pre>
  121. </div>
  122. </div></dd><dt class=" even"><a name="loadingIndicator"></a><a name="loadingIndicator_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#loadingIndicator">loadingIndicator</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Show (or not) the loading element in the background of the table. Note that you should
  123. include the dataTables.scroller.css file for this to be displayed correctly.</p><div class="collapse_details"><dl class="details">
  124. </dl>
  125. <h5>Example</h5>
  126. <div class="example-code">
  127. <pre class="brush: js"> var oTable = $('#example').dataTable( {
  128. "sScrollY": "200px",
  129. "sDom": "frtiS",
  130. "bDeferRender": true,
  131. "oScroller": {
  132. "loadingIndicator": true
  133. }
  134. } );</pre>
  135. </div>
  136. </div></dd><dt class=" odd"><a name="rowHeight"></a><a name="rowHeight_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#rowHeight">rowHeight</a></span><span class="type-sig"><span class="type-signature"> :int|string</span></span></dt><dd class=" odd"><p>Scroller will attempt to automatically calculate the height of rows for it's internal
  137. calculations. However the height that is used can be overridden using this parameter.</p><div class="collapse_details"><dl class="details">
  138. </dl>
  139. <h5>Example</h5>
  140. <div class="example-code">
  141. <pre class="brush: js"> var oTable = $('#example').dataTable( {
  142. "sScrollY": "200px",
  143. "sDom": "frtiS",
  144. "bDeferRender": true,
  145. "oScroller": {
  146. "rowHeight": 30
  147. }
  148. } );</pre>
  149. </div>
  150. </div></dd><dt class=" even"><a name="serverWait"></a><a name="serverWait_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#serverWait">serverWait</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" even"><p>When using server-side processing, Scroller will wait a small amount of time to allow
  151. the scrolling to finish before requesting more data from the server. This prevents
  152. you from DoSing your own server! The wait time can be configured by this parameter.</p><div class="collapse_details"><dl class="details">
  153. </dl>
  154. <h5>Example</h5>
  155. <div class="example-code">
  156. <pre class="brush: js"> var oTable = $('#example').dataTable( {
  157. "sScrollY": "200px",
  158. "sDom": "frtiS",
  159. "bDeferRender": true,
  160. "oScroller": {
  161. "serverWait": 100
  162. }
  163. } );</pre>
  164. </div>
  165. </div></dd><dt class=" odd"><a name="trace"></a><a name="trace_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#trace">trace</a></span><span class="type-sig"><span class="type-signature"> :bool</span></span></dt><dd class=" odd"><p>Indicate if Scroller show show trace information on the console or not. This can be
  166. useful when debugging Scroller or if just curious as to what it is doing, but should
  167. be turned off for production.</p><div class="collapse_details"><dl class="details">
  168. </dl>
  169. <h5>Example</h5>
  170. <div class="example-code">
  171. <pre class="brush: js"> var oTable = $('#example').dataTable( {
  172. "sScrollY": "200px",
  173. "sDom": "frtiS",
  174. "bDeferRender": true,
  175. "oScroller": {
  176. "trace": true
  177. }
  178. } );</pre>
  179. </div>
  180. </div></dd>
  181. </dl></div>
  182. </div>
  183. </div>
  184. <div class="fw_footer">
  185. Scroller: Copyright 2011-2012 Allan Jardine, all rights reserved<br>
  186. Documentation generated by <a href="https://github.com/micmath/JSDoc">JSDoc 3</a> on
  187. 23th Sep 2012 - 14:28
  188. with the <a href="http://datatables.net/">DataTables</a> template.
  189. </div>
  190. </body>
  191. </html>