var scrollBarHandleHeight = scrollBar.offsetHeight;
var scrollBarHandleTop = +scrollBar.style.top;
var listHeight = list.clientHeight;
var scrollPosition = scrollBarHandleTop / (listHeight - scrollBarHandleHeight);
list.scrollTop = (list.scrollHeight - list.clientHeight) * scrollPosition;
const style = {
header: { height: '50%' }
};
prepareStyle: function() {
let deviceHeight = ...; // Find API by yourself
let _style = _.merge({}, style);
if (style.header.height.substr(-1, 1) === '%')
_style.header.height = deviceHeight * (+style.header.height.slice(0, -1)) / 100;
return _style;
}
$ npm dedupe
$ npm shrinkwrap
gulp.src(['./app/css/**/*.css', './bower_components/**/*.css'])
module.exports = {
cache: true,
debug: true,
devtool: 'source-map',
entry: {
app: ['./src'],
style: ['./src/style'],
vendor: ...