This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const scrollToItemId = (containerId, srollToId) => { | |
const scrollContainer = document.getElementById(containerId); | |
const item = document.getElementById(scrollToId); | |
//with animation | |
const from = scrollContainer.scrollTop; | |
const by = item.offsetTop - scrollContainer.scrollTop; | |
if (from < item.offsetTop) { | |
if (item.offsetTop > scrollContainer.scrollHeight - scrollContainer.clientHeight) { | |
by = (scrollContainer.scrollHeight - scrollContainer.clientHeight) - scrollContainer.scrollTop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
set :application, "net" | |
set :repository, "[email protected]:net.git" | |
set :scm, :git | |
set :default_environment, { | |
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
} |