d3plus-text
Advanced tools
Comparing version 1.2.2 to 1.2.3
import { select } from "d3-selection"; | ||
var elemRTL = function elemRTL(e) { | ||
return select(e).attr("dir") === "rtl" || select(e).style("direction") === "rtl"; | ||
return select(e).size() && (select(e).attr("dir") === "rtl" || select(e).style("direction") === "rtl"); | ||
}; | ||
@@ -12,5 +12,8 @@ | ||
export default (function () { | ||
var elem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body; | ||
while (elem !== document.body && !elemRTL(elem)) elem = elem.parentNode; | ||
var elem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "body"; | ||
elem = select(elem).node(); | ||
while (elem && elem.parentNode && elem !== document.body && !elemRTL(elem)) { | ||
elem = elem.parentNode; | ||
} | ||
return elemRTL(elem) || elemRTL("html"); | ||
}); |
{ | ||
"name": "d3plus-text", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "A smart SVG text box with line wrapping and automatic font size scaling.", | ||
@@ -5,0 +5,0 @@ "main": "es/index.js", |
@@ -644,2 +644,2 @@ # d3plus-text | ||
###### <sub>Documentation generated on Tue, 07 Mar 2023 17:11:32 GMT</sub> | ||
###### <sub>Documentation generated on Tue, 07 Mar 2023 17:29:23 GMT</sub> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
625302
8663