You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also there is one more additional module in a separate file
126
+
-__ui.scroll.jqlite__ module
127
+
It is empty since it was deprecated in v1.6.0.
106
128
107
129
108
130
-------------------
@@ -135,7 +157,7 @@ Some of the properties offered by the adapter can also be accessed directly from
135
157
***top-visible-element - assignable expression**, optional - a reference to the DOM element currently in the topmost visible position will be injected in the appropriate scope. See also `topVisibleElement` adapter property.
136
158
***top-visible-scope - assignable expression**, optional - a reference to the scope created for the item currently in the topmost visible position will be injected in the appropriate scope. See also `topVisibleScope` adapter property.
137
159
138
-
The `expression` can be any angular expression (assignable expression where so specified). All expressions are evaluated once at the time when the scroller is initalized. Changes in the expresion value after scroller intialization will have no impact on the scroller behavior.
160
+
The `expression` can be any angular expression (assignable expression where so specified). All expressions are evaluated once at the time when the scroller is initialized. Changes in the expression value after scroller initialization will have no impact on the scroller behavior.
139
161
140
162
The assignable expressions will be used by scroller to inject the requested value into the target scope. The scope associated with the viewport (the element marked with the [uiScrollViewport](#uiscrollviewport-directive) directive) will be used as the target scope. If the viewport is not defined (window viewport), the $rootScope will be used as the target scope. Note that the nearest additional scope-wrapper (like ng-if directive set right on the viewport) makes this mechanism unusable. There are two options which help in this case:
141
163
@@ -175,9 +197,9 @@ exactly `count` elements unless it hit eof/bof.
175
197
176
198
* Properties `minIndex` and `maxIndex`
177
199
178
-
As the scroller recieves the items requested by the `get` method, the value of minimum and maximum values of the item index are placed in the `minIndex` and `maxIndex` properties respectively. The values of the properties are cumulative - the value of the `minIndex` will never increase, and the value of the `maxIndex` will never decrease - except the values are reset in response to a call to the adapter `reload` method. The values of the properties are used to maintain the appearance of the scroller scrollBar.
200
+
As the scroller receives the items requested by the `get` method, the value of minimum and maximum values of the item index are placed in the `minIndex` and `maxIndex` properties respectively. The values of the properties are cumulative - the value of the `minIndex` will never increase, and the value of the `maxIndex` will never decrease - except the values are reset in response to a call to the adapter `reload` method. The values of the properties are used to maintain the appearance of the scroller scrollBar.
179
201
180
-
Values of the properties can be assigned programmatically. If the range of the index values is known in advance, assigneing them programmatically would improve the usability of the scrollBar.
202
+
Values of the properties can be assigned programmatically. If the range of the index values is known in advance, assigning them programmatically would improve the usability of the scrollBar.
181
203
182
204
183
205
###Adapter
@@ -192,7 +214,7 @@ Adapter object implements the following properties:
192
214
*`topVisibleScope` - a read only reference to the scope created for the item currently in the topmost visible position.
193
215
*`disabled` - setting `disabled` to `true` disables scroller's scroll/resize events handlers. This can be useful if you have multiple scrollers within the same scrollViewport and you want to prevent some of them from responding to the events.
194
216
195
-
Adapater object implements the following methods
217
+
Adapter object implements the following methods
196
218
197
219
* Method `isBOF`
198
220
@@ -258,7 +280,7 @@ Adapater object implements the following methods
258
280
Adapter methods `applyUpdates`, `append` and `prepend` provide a way to update the scroller content without full reload of the content from the datasource. The updates are performed by changing the items in the scroller internal buffer after they are loaded from the datasource. Items in the buffer can be deleted or replaced with one or more items.
259
281
260
282
_Important!_ Update datasource to match the scroller buffer content. Keep in mind that the modifications made by the adapter methods are only applied to the content of the buffer. As the items in response to scrolling are pushed out of the buffer, the modifications are lost. It is your responsibility to ensure that as the scroller is scrolled back and a modified item is requested from the datasource again the values returned by the datasource would reflect the updated state. In other words you have to make sure that in addition to manipulating the scroller content you also apply the modifications to the dataset underlying the datasource.
261
-
[Here](https://rawgit.com/angular-ui/ui-scroll/master/demo/append/append.html) is the example of such implementaion.
283
+
[Here](https://rawgit.com/angular-ui/ui-scroll/master/demo/append/append.html) is the example of such implementation.
262
284
263
285
#### Animations
264
286
In the fashion similar to ngRepeat the following animations are supported:
@@ -291,7 +313,7 @@ the browser window object will be used as viewport.
291
313
292
314
## jqLiteExtras service
293
315
294
-
This service implements some DOM element methods of jQuery which are currently not implemented in jQlite, namely
316
+
This service implements some DOM element methods of jQuery which are currently not implemented in jqLite, namely
295
317
296
318
* before(elem)
297
319
* height() and height(value)
@@ -300,7 +322,7 @@ This service implements some DOM element methods of jQuery which are currently n
300
322
* offset()
301
323
302
324
These methods are being registered on angular.element during 'ui.scroll' module run automatically only if jQuery is not loaded.
303
-
It is so since ui-scroll v1.6.0. In previous versions there was a separate module 'ui.scroll.jqlite' wchich should have been
325
+
It is so since ui-scroll v1.6.0. In previous versions there was a separate module 'ui.scroll.jqlite' which should have been
304
326
included in the dependency list of the main app module. So currently we leave 'ui.scroll.jqlite' module stub with no content
305
327
to provide full backward compatibility.
306
328
@@ -310,10 +332,10 @@ to provide full backward compatibility.
310
332
311
333
## uiScrollTh and uiScrollTd directives
312
334
313
-
The uiScrollTh and uiScrollTd directives provide a way to build flexible dynamic grids. Handling of grid rows is done by the uiScroll directive itself. In addition to this uiScrollTh and uiScrollTd directive provide tools to programmatically change grid layout, inclduing applying styles to columns, changing column size and order, as well as saving the modifications to the layout and applying previosly saved layouts.
335
+
The uiScrollTh and uiScrollTd directives provide a way to build flexible dynamic grids. Handling of grid rows is done by the uiScroll directive itself. In addition to this uiScrollTh and uiScrollTd directive provide tools to programmatically change grid layout, including applying styles to columns, changing column size and order, as well as saving the modifications to the layout and applying previously saved layouts.
314
336
At this point the above functionality is supported only for table based scrollable grids.
315
337
316
-
Here is the basic html template for scrollable grid using the uiScrollTh and uiScrollTd directives. Keep in mind that the height of the scroll viewport (in this case the `<TABLE>` tag) should be constrained. Also make sure that the initial column widths are applied uniformly to both headers (`<TH>`) and cells (`<TD>`)
338
+
Here is the basic html template for scrollable grid using the uiScrollTh and uiScrollTd directives. Keep in mind that the height of the scroll viewport (in this case the `<TABLE>` tag) should be constrained. Also, make sure that the initial column widths are applied uniformly to both headers (`<TH>`) and cells (`<TD>`)
317
339
318
340
```html
319
341
<TABLEui-scroll-viewportclass="grid">
@@ -349,13 +371,62 @@ A reference to this object is injected as a property named `gridAdapter`in the s
349
371
350
372
* Method `getLayout()` - returns an object describing current scrollable grid layout.
351
373
* Method `applyLayout(layout)` - restores scrollabel grid layout to the state as defined by the object passed as the parameter
352
-
* Method `columnFromPoint(x,y)` - if the coordinates belong to a scrollable grid column returns the appropriate ColumnAdapter object. Otherwise returns `undefined`.
374
+
* Method `columnFromPoint(x,y)` - if the coordinates belong to a scrollable grid column returns the appropriate ColumnAdapter object. Otherwise, returns `undefined`.
353
375
354
376
`ColumnAdapter` object implements the following methods:
355
377
356
378
* Method `css(name, value)` - sets the css property `name` to `value` for the column header as well as for the column cells.
357
-
* Method `moveBefore(column)` - moves the column in front of the column refrenced by the parameter. If the parameter is null the column will become the rightmost column.
379
+
* Method `moveBefore(column)` - moves the column in front of the column referenced by the parameter. If the parameter is null, the column will become the rightmost column.
380
+
381
+
382
+
-------------------
383
+
384
+
385
+
## Development
358
386
387
+
Please feel free to make Pull Requests. Below is the information which could be useful for local developing and contributing.
388
+
389
+
The ui-scroll sources are in [./src](https://github.com/angular-ui/ui-scroll/tree/master/src) folder. They could not be run as is
390
+
because of ES6 modules (since v1.6.0), they should be built. Build process includes jshint sources verification, webpack-based
391
+
distributive files forming and tests running.
392
+
393
+
Three npm scripts are available for developing.
394
+
395
+
__1__. To run dev-server use
396
+
397
+
```
398
+
npm start
399
+
```
400
+
401
+
This should start development server on 5005 port over the [./demo](https://github.com/angular-ui/ui-scroll/tree/master/demo) folder.
402
+
The middleware is configured to provide work with temporary distributive files (./temp) despite the direct links to public distributive
403
+
files (./dist). So the dist-folder should stay clear until the development is finished. Dev-server watches for the source codes (./src)
404
+
and automatically re-build temporary distributive files.
405
+
406
+
__2__. To run tests in keep-alive mode use
407
+
408
+
```
409
+
npm run test
410
+
```
411
+
412
+
This runs karma testing against temporary distributive files (./temp). We created a number of specifications which consist of more
413
+
than 160 tests. They are living at [./test](https://github.com/angular-ui/ui-scroll/tree/master/test) folder. Karma watches for temp
414
+
and test folders changes and automatically re-run tests.
415
+
416
+
__3__. To run full build use
417
+
418
+
```
419
+
npm run build
420
+
```
421
+
422
+
After developing and testing complete the build process should be run to
423
+
a) pass through jshint,
424
+
b) generate minified versions of distributive,
425
+
c) run tests with minified distributive files,
426
+
d) obtain all necessary files in [./dist](https://github.com/angular-ui/ui-scroll/tree/master/dist) folder.
427
+
428
+
PR should include source code (./scr) and tests (./test) changes and may not include public distributive (./dist) changes.
429
+
359
430
360
431
-------------------
361
432
@@ -366,6 +437,7 @@ A reference to this object is injected as a property named `gridAdapter`in the s
366
437
* Introduced ES6 modules in the source codes.
367
438
* Improved build process with Webpack.
368
439
* Added sourcemaps. Fixed dev-server.
440
+
* Removed 'ui.scroll.jqlite' module. Added jqLiteExtras service to 'ui.scroll' module.
369
441
* Significantly changed readme.
370
442
371
443
###v1.5.2
@@ -382,7 +454,7 @@ A reference to this object is injected as a property named `gridAdapter`in the s
382
454
* Implemented "on controller" syntax to specify the scope where an adapter object has to be injected.
383
455
384
456
###v1.4.1
385
-
* Developed a new complex approach of paddings elements height calculation (see [details](https://github.com/angular-ui/ui-scroll/pull/77)).
457
+
* Developed a new complex approach of padding elements height calculation (see [details](https://github.com/angular-ui/ui-scroll/pull/77)).
386
458
* Added startIndex attribute.
387
459
* Changed clipTop/clipBottom methods logic.
388
460
* Some new demos, tests, cleanup and other minor refactoring.
@@ -427,4 +499,3 @@ A reference to this object is injected as a property named `gridAdapter`in the s
427
499
* Introduced API to dynamically update scroller content.
428
500
* Deep 'name' properties access via dot-notation in template.
429
501
* Fixed the problem occurring if the scroller is $destroyed while there are requests pending: [#64](https://github.com/Hill30/NGScroller/issues/64).
0 commit comments