Remove scroll helper... not being used anymore.
This commit is contained in:
parent
40347b7807
commit
863114b4f5
2 changed files with 0 additions and 34 deletions
|
@ -68,7 +68,6 @@ import VersionCheckImage from './version_check_image';
|
|||
import Wikis from './wikis';
|
||||
import ZenMode from './zen_mode';
|
||||
import initSettingsPanels from './settings_panels';
|
||||
import ScrollHelper from './helpers/scroll_helper';
|
||||
import initExperimentalFlags from './experimental_flags';
|
||||
import OAuthRememberMe from './oauth_remember_me';
|
||||
import PerformanceBar from './performance_bar';
|
||||
|
@ -99,8 +98,6 @@ import UserFeatureHelper from './helpers/user_feature_helper';
|
|||
return false;
|
||||
}
|
||||
|
||||
ScrollHelper.setScrollWidth();
|
||||
|
||||
path = page.split(':');
|
||||
shortcut_handler = null;
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
import $ from 'jquery';
|
||||
|
||||
const ScrollHelper = {
|
||||
getScrollWidth() {
|
||||
const $rulerContainer = $('<div>').css({
|
||||
visibility: 'hidden',
|
||||
width: 100,
|
||||
overflow: 'scroll',
|
||||
});
|
||||
|
||||
const $ruler = $('<div>').css({
|
||||
width: 100,
|
||||
});
|
||||
|
||||
$ruler.appendTo($rulerContainer);
|
||||
|
||||
$rulerContainer.appendTo('body');
|
||||
|
||||
const scrollWidth = $ruler.get(0).offsetWidth;
|
||||
|
||||
$rulerContainer.remove();
|
||||
|
||||
return 100 - scrollWidth;
|
||||
},
|
||||
|
||||
setScrollWidth() {
|
||||
$('body').attr('data-scroll-width', ScrollHelper.getScrollWidth());
|
||||
},
|
||||
};
|
||||
|
||||
export default ScrollHelper;
|
Loading…
Reference in a new issue