Skip to content

Commit

Permalink
отказ от события scrollstop в пользу обычного scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
kompolom committed Jul 18, 2016
1 parent 5022b2e commit 4d4dbdb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 92 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bem-scrollspy",
"version": "0.1.6",
"version": "0.2.0",
"repository": {
"type": "git",
"url": "git://github.com/bem-incubator/bem-scrollspy.git"
Expand Down
81 changes: 0 additions & 81 deletions common.blocks/jquery/__event/_type/jquery__event_type_scroll.js

This file was deleted.

8 changes: 4 additions & 4 deletions common.blocks/scrollspy/scrollspy.browser.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* global modules:false */

modules.define('scrollspy',
['i-bem__dom', 'jquery__event_type_scroll', 'functions__throttle', 'next-tick'],
function(provide, BEMDOM, $, throttle, nextTick) {
['i-bem__dom', 'jquery', 'functions__throttle'],
function(provide, BEMDOM, $, throttle) {

provide(BEMDOM.decl('scrollspy', {
onSetMod : {
Expand Down Expand Up @@ -146,7 +146,7 @@ provide(BEMDOM.decl('scrollspy', {

_listeners: {},

pause: 100,
pause: 50,

/**
* Forward direction name
Expand Down Expand Up @@ -229,7 +229,7 @@ provide(BEMDOM.decl('scrollspy', {

live: function() {
var win = BEMDOM.win;
win.bind('scrollstop', $.proxy(throttle(this._onScroll, this.pause, this), this));
win.bind('scroll', $.proxy(throttle(this._onScroll, this.pause, this), this));
this.scroll = win.scrollTop();
this.posBottom = this.scroll + this.screenH;
return false;
Expand Down
7 changes: 1 addition & 6 deletions common.blocks/scrollspy/scrollspy.deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
block: 'functions',
elem: 'throttle'
},
{
block: 'jquery',
elem: 'event',
mods: {type: 'scroll'}
},
{
block: 'next-tick'
}
]
})
});

0 comments on commit 4d4dbdb

Please sign in to comment.