aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/utils.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-09-18 21:13:50 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-09-18 21:13:50 +0200
commitd1ba150ea79689a55898efa760f7d77ca5ed601c (patch)
tree3b92ea9bae396fe1ab0b60310f4aa473c1194d0f /web/src/js/utils.js
parent01da54f1c306a5d595046bd39bf2be8bbc86c132 (diff)
downloadmitmproxy-d1ba150ea79689a55898efa760f7d77ca5ed601c.tar.gz
mitmproxy-d1ba150ea79689a55898efa760f7d77ca5ed601c.tar.bz2
mitmproxy-d1ba150ea79689a55898efa760f7d77ca5ed601c.zip
web: detailpane impl
Diffstat (limited to 'web/src/js/utils.js')
-rw-r--r--web/src/js/utils.js12
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