ヒントとcss transform

と、ご指摘頂いたので hints-ext.js の css transform 対応に挑戦しました。

http://github.com/caisui/vimperator/blob/master/plugin/hints-ext.js


処理コストがそこそこかかるのと現行そんなに利用されていないと思うので
デフォルトはoff にしています。

let use_hints_ext_tranform=1

で 有効になります。

off だと

となるところ、on では

こうなります。

件の caret mode も

となります。

また、off でも

:js window.setTimeout(function () hints.addSimpleMap(["<C-t>"], function () hints.relocation_transform()), 0)

のように記述しておけば、transform 無視 ヒント状態 から transform 考慮状態に移行できます。

css transform 周りメモ
  • css transformの影響を受ける
    • Element.getBoundingClientRect, Element.getClientRects
  • css transformの影響を受けない
    • offsetXXX(top,left,width,height)
    • Range.getBoundingClientRect, Range.getClientRects
  • rotate(-45deg) 近辺のとき label の位置が 残念になる