Skip to content

Commit d236afc

Browse files
committed
avoid "new Buffer" due to nodejs Buffer entity
1 parent 494db89 commit d236afc

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

dist/ui-scroll.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-ui-scroll
33
* https://github.com/angular-ui/ui-scroll.git
4-
* Version: 1.5.2 -- 2017-01-13T00:53:53.341Z
4+
* Version: 1.5.2 -- 2017-01-17T11:43:56.479Z
55
* License: MIT
66
*/
77

@@ -197,9 +197,9 @@ module.exports = exports['default'];
197197
'use strict';
198198

199199
exports.__esModule = true;
200-
exports['default'] = Buffer;
200+
exports['default'] = ScrollBuffer;
201201

202-
function Buffer(elementRoutines, bufferSize) {
202+
function ScrollBuffer(elementRoutines, bufferSize) {
203203
var buffer = Object.create(Array.prototype);
204204

205205
angular.extend(buffer, {
@@ -695,7 +695,6 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', function () {
695695
};
696696

697697
function link($scope, element, $attr, controllers, linker) {
698-
699698
var match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);
700699
if (!match) {
701700
throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\'');

dist/ui-scroll.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/modules/buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function Buffer(elementRoutines, bufferSize) {
1+
export default function ScrollBuffer(elementRoutines, bufferSize) {
22
const buffer = Object.create(Array.prototype);
33

44
angular.extend(buffer, {

src/ui-scroll.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
import ElementRoutines from './modules/elementRoutines.js';
13-
import Buffer from './modules/buffer.js';
13+
import ScrollBuffer from './modules/buffer.js';
1414
import Viewport from './modules/viewport.js';
1515
import Adapter from './modules/adapter.js';
1616

@@ -56,7 +56,6 @@ angular.module('ui.scroll', [])
5656

5757

5858
function link($scope, element, $attr, controllers, linker) {
59-
6059
const match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);
6160
if (!match) {
6261
throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\'');
@@ -83,7 +82,7 @@ angular.module('ui.scroll', [])
8382
let pending = [];
8483

8584
let elementRoutines = new ElementRoutines($injector);
86-
let buffer = new Buffer(elementRoutines, bufferSize);
85+
let buffer = new ScrollBuffer(elementRoutines, bufferSize);
8786
let viewport = new Viewport(elementRoutines, buffer, element, viewportController, padding);
8887
let adapter = new Adapter($rootScope, $parse, $attr, viewport, buffer, adjustBuffer, element);
8988

0 commit comments

Comments
 (0)