diff options
Diffstat (limited to 'web/src/js/utils.js')
-rw-r--r-- | web/src/js/utils.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/web/src/js/utils.js b/web/src/js/utils.js index 6e545d8a..947ad5c1 100644 --- a/web/src/js/utils.js +++ b/web/src/js/utils.js @@ -12,12 +12,22 @@ var AutoScrollMixin = { }, }; +var StickyHeadMixin = { + adjustHead: function(){ + // Abusing CSS transforms to set the element + // referenced as head into some kind of position:sticky. + var head = this.refs.head.getDOMNode(); + head.style.transform = "translate(0,"+this.getDOMNode().scrollTop+"px)"; + } +}; var Key = { UP: 38, DOWN: 40, + PAGE_UP: 33, + PAGE_DOWN: 34, LEFT: 37, RIGHT: 39, ENTER: 13, ESC: 27 -}
\ No newline at end of file +};
\ No newline at end of file |