[fix] xpath & cfi resolution
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Evan Reichard 2023-11-06 19:41:35 -05:00
parent 5cc1e2d71c
commit 0ac00dfa41
2 changed files with 2 additions and 4 deletions

View File

@ -1034,7 +1034,8 @@ class EBookReader {
// XPath to CSS Selector
let derivedSelector = remainingXPath
.replace(/^\/html\/body/, "body")
.replace(/\/(\w+)\[(\d+)\]/g, " $1:nth-of-type($2)");
.replace(/\/(\w+)\[(\d+)\]/g, " $1:nth-of-type($2)")
.replace(/\//g, " ");
// Validate Namespace
if (namespaceURI) remainingXPath = remainingXPath.replaceAll("/", "/ns:");

View File

@ -101,9 +101,6 @@ func getSVGBezierOpposedLine(pointA SVGGraphPoint, pointB SVGGraphPoint) SVGBezi
Length: int(math.Sqrt(math.Pow(lengthX, 2) + math.Pow(lengthY, 2))),
Angle: int(math.Atan2(lengthY, lengthX)),
}
// length = Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
// angle = Math.atan2(lengthY, lengthX)
}
func getSVGBezierControlPoint(currentPoint *SVGGraphPoint, prevPoint *SVGGraphPoint, nextPoint *SVGGraphPoint, isReverse bool) SVGGraphPoint {