Skip to content

Commit 8cce506

Browse files
authored
Merge pull request #243 from angular-ui/issue-241_bind-unbind-is-deprecreated
Deprecation of bind and unbind methods
2 parents a957d07 + ba3da78 commit 8cce506

12 files changed

+931
-411
lines changed

README.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ _Important!_ The viewport height must be constrained. If the height of the viewp
8686
in the datasource. Even if it does not, using the directive this way does not provide any advantages over using ng-repeat, because
8787
item template will be always instantiated for every item in the datasource.
8888

89-
_Important!_ There is a Scroll Anchoring feature enforced by Google Chrome (since Chrome 56) which makes scroller behaviour incorrect.
89+
_Important!_ There is a Scroll Anchoring feature enforced by some browsers (e.g Google Chrome since v56) which makes scroller behavior incorrect.
9090
The ui-scroll-viewport directive eliminates this effect by disabling the 'overflow-anchor' css-property on its element.
91-
But if the ui-scroll-viewport is not presented in the template, you should take care of this manually.
91+
But if the ui-scroll-viewport is not presented in the template, you should take care of this manually by switching it off on the body/html container.
9292

9393

9494
### Examples
@@ -135,6 +135,8 @@ To use it in your angular-app you should add the module (modules)
135135
angular.module('application', ['ui.scroll', 'ui.scroll.grid'])
136136
```
137137

138+
_Note:_ angular-ui-scroll works with AngularJS v1.2.0 and above.
139+
138140
Currently we have 2 regular modules which can be added to the angular-app you are developing:
139141
- __ui.scroll__ module which has
140142
- [uiScroll directive](#uiscroll-directive)
@@ -274,9 +276,9 @@ Adapter object implements the following methods
274276

275277
reload(startIndex)
276278

277-
Calling this method reinitializes and reloads the scroller content. `startIndex` is an integer indicating what item index the scroller will use to start the load process. The value of the argument replaces the value provided with the start-index attribute. Calling `reload()` is equivalent to calling `reload` method with current value of the `start-index` attribute.
279+
Calling this method re-initializes and reloads the scroller content. `startIndex` is an integer indicating what item index the scroller will use to start the load process. The value of the argument replaces the value provided with the start-index attribute. Calling `reload()` is equivalent to calling `reload` method with current value of the `start-index` attribute.
278280

279-
_Important!_ `startIndex` should fall within underlying datset boundaries. The scroller will request two batches of items one starting from the `startIndex` and another one preceding the first one (starting from `startIndex - bufferSize`). If both requests come back empty, the scroller will consider the dataset to be empty and will place no further data requests.
281+
_Important!_ `startIndex` should fall within underlying dataset boundaries. The scroller will request two batches of items one starting from the `startIndex` and another one preceding the first one (starting from `startIndex - bufferSize`). If both requests come back empty, the scroller will consider the dataset to be empty and will place no further data requests.
280282

281283
* Method `applyUpdates`
282284

@@ -296,7 +298,7 @@ Adapter object implements the following methods
296298
* **updater** is a function to be applied to every item currently in the buffer. The function will receive 3 parameters: `item`, `scope`, and `element`. Here `item` is the item to be affected, `scope` is the item $scope, and `element` is the html element for the item. The return value of the function should be an array of items. Similarly to the `newItem` parameter (see above), if the array is empty(`[]`), the item is deleted, otherwise the item is replaced by the items in the array. If the return value is not an array, the item remains unaffected, unless some updates were made to the item in the updater function. This can be thought of as in place update.
297299

298300
Options for both signatures, an object with following fields
299-
* **immutableTop** is a boolean flag with `false` defalt value. This option has an impact on removing/inserting items procedure. If it's `false`, deleting the topmost item will lead to incrementing min index, also inserting new item(s) before the topmost one will lead to decrementing min index. If it's `true`, min index will not be affected, max index will be shifted instead. If it's `true`, no matter which item is going to be removed/inserted, max index will be reduced/increased respectively.
301+
* **immutableTop** is a boolean flag with `false` default value. This option has an impact on removing/inserting items procedure. If it's `false`, deleting the topmost item will lead to incrementing min index, also inserting new item(s) before the topmost one will lead to decrementing min index. If it's `true`, min index will not be affected, max index will be shifted instead. If it's `true`, no matter which item is going to be removed/inserted, max index will be reduced/increased respectively.
300302

301303
Let's discuss a little sample. We have `{{$index}}: {{item}}` template and three rows: `1: item1`, `2: item2`, `3: item3`. Then we want to remove the first item. Without `immutableTop` we'll get `2: item2`, `3: item3`. With `immutableTop` we'll get `1: item2`, `2: item3`. The same for inserting, say, `item0` before `item1`. Without `immutableTop` we'll get `0: item0`, `1: item1`, `2: item2`, `3: item3`. With `immutableTop` we'll get `1: item0`, `2: item1`, `3: item2`, `4: item3`.
302304

@@ -413,7 +415,7 @@ A reference to this object is injected as a property named `gridAdapter`in the s
413415
`GridAdapter` object implements the following methods:
414416

415417
* Method `getLayout()` - returns an object describing current scrollable grid layout.
416-
* Method `applyLayout(layout)` - restores scrollabel grid layout to the state as defined by the object passed as the parameter
418+
* Method `applyLayout(layout)` - restores scrollable grid layout to the state as defined by the object passed as the parameter
417419
* Method `columnFromPoint(x,y)` - if the coordinates belong to a scrollable grid column returns the appropriate ColumnAdapter object. Otherwise, returns `undefined`.
418420

419421
`ColumnAdapter` object implements the following methods:
@@ -469,17 +471,20 @@ npm run build
469471
b) generate compressed and uncompressed versions of the ui-scroll distributive in the public [./dist](https://github.com/angular-ui/ui-scroll/tree/master/dist) folder,
470472
c) run tests over minified distributive files.
471473

472-
Pull Rerquest should include source code (./scr) changes, may include tests (./test) changes and may not include public distributive (./dist) changes.
474+
Pull Request should include source code (./scr) changes, may include tests (./test) changes and may not include public distributive (./dist) changes.
473475

474476

475477
-------------------
476478

477479

478480
## Change log
479481

482+
### v1.8.1
483+
* Removed deprecated bind/unbind methods.
484+
480485
### v1.8.0
481-
* Reconsidered scroll event handling
482-
* Fixed inertia scrolling issues
486+
* Reconsidered scroll event handling.
487+
* Fixed inertia scrolling issues.
483488

484489
### v1.7.6
485490
* Added immutableTop option for applyUpdates and prepend Adapter methods.
@@ -558,7 +563,7 @@ Pull Rerquest should include source code (./scr) changes, may include tests (./t
558563

559564
### v1.3.1
560565
* Changed the logic of viewport scroll/padding recalculation.
561-
* Splitted test specifications.
566+
* Reorganized test specifications.
562567
* Updated dev-dependencies (package.json).
563568
* Implemented append/prepend methods on the adapter.
564569

bower.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-ui-scroll",
33
"description": "AngularJS infinite scrolling module",
4-
"version": "1.8.0",
4+
"version": "1.8.1",
55
"main": "./dist/ui-scroll.js",
66
"homepage": "https://github.com/angular-ui/ui-scroll.git",
77
"license": "MIT",
@@ -13,6 +13,7 @@
1313
"ui.scroll",
1414
"ui-scroll",
1515
"angular-ui-scroll",
16+
"virtual",
1617
"unlimited",
1718
"infinite",
1819
"live",

dist/ui-scroll-grid.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.js

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)