From 6afe064f5f47d4717e22a4b40c9905cfa392b310 Mon Sep 17 00:00:00 2001 From: Kechao CAI Date: Fri, 5 Aug 2016 19:27:57 +0800 Subject: [PATCH] Fix the Hok misaligned hints --- plugins/hok.ks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/hok.ks.js b/plugins/hok.ks.js index 880e75e..b00de1b 100644 --- a/plugins/hok.ks.js +++ b/plugins/hok.ks.js @@ -842,6 +842,8 @@ var hok = function () { var rect = html.getBoundingClientRect(); pos = { x: -rect.left, y: -rect.top }; } + pos.x = pos.x > 0 ? pos.x : 0; + pos.y = pos.y > 0 ? pos.y : 0; return [ pos.x, pos.y ]; }