Skip to content
Permalink
Browse files

Add scrolling

  • Loading branch information
edrthomas committed Jul 12, 2019
1 parent 751ba7a commit bd27917b64f2ef7bebd59ae0b45550ffd0dee4d3
Showing with 6 additions and 1 deletion.
  1. 0 scripts/build.sh
  2. +5 −0 src/components/table.js
  3. +1 −1 src/components/table.vue
0 scripts/build.sh 100644 → 100755
No changes.
@@ -3,6 +3,11 @@ var fs = require('fs');
module.exports = {
props: ['data', 'columns'],
methods: {
scrollFix: function(anchor) {
setTimeout(() => $('html, body').animate({
scrollTop: document.querySelectorAll('[name="' + anchor + '"]')[0].getBoundingClientRect().top - 70 + window.pageYOffset || document.documentElement.scrollTop
}, 1000), 1)
},
hasHTMLLink: function(string) {
if(string !== undefined) {
return string.includes("href");
@@ -37,7 +37,7 @@
</td>
<td v-if="columns.indexOf('specification') !== -1">
<div v-if="item.specificationAnchor">
<router-link class="nav-link" to="/references">
<router-link class="nav-link" to="/references" @click.native="scrollFix(item.specificationAnchor)"">
{{ item.specification }}
</router-link>
</div>

0 comments on commit bd27917

Please sign in to comment.
You can’t perform that action at this time.