X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=_static%2Fdoctools.js;h=344db17ddbb7aea09b227835a7cd1c3265aeb172;hb=ec0598837ed468aa8e633d5b6a08e12f8614a8d2;hp=b33f87fcb249ea9b0e0a07fa9c5f2595ea925709;hpb=e39eedb1ea4fdc8af01989629a4cba2b4f8c84b6;p=awesomized%2Flibmemcached diff --git a/_static/doctools.js b/_static/doctools.js index b33f87fc..344db17d 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -87,13 +87,14 @@ jQuery.fn.highlightText = function(text, className) { node.nextSibling)); node.nodeValue = val.substr(0, pos); if (isInSVG) { + var bbox = span.getBBox(); var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - var bbox = node.parentElement.getBBox(); - rect.x.baseVal.value = bbox.x; + rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute('class', className); + var parentOfText = node.parentNode.parentNode; addItems.push({ "parent": node.parentNode, "target": rect});