Slightly more graceful check for createSVGPoint.

Less brittle, anyway.
This commit is contained in:
Jason Davies 2012-02-19 23:56:06 +00:00
Родитель 12ac60d273
Коммит 064822630e
3 изменённых файлов: 6 добавлений и 6 удалений

2
d3.v2.js поставляемый
Просмотреть файл

@ -2398,7 +2398,7 @@ var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
function d3_mousePoint(container, e) { function d3_mousePoint(container, e) {
var svg = container.ownerSVGElement || container; var svg = container.ownerSVGElement || container;
if (svg instanceof SVGSVGElement) { if (svg.createSVGPoint) {
var point = svg.createSVGPoint(); var point = svg.createSVGPoint();
if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) { if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
svg = d3.select(document.body) svg = d3.select(document.body)

8
d3.v2.min.js поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -7,7 +7,7 @@ var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
function d3_mousePoint(container, e) { function d3_mousePoint(container, e) {
var svg = container.ownerSVGElement || container; var svg = container.ownerSVGElement || container;
if (svg instanceof SVGSVGElement) { if (svg.createSVGPoint) {
var point = svg.createSVGPoint(); var point = svg.createSVGPoint();
if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) { if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
svg = d3.select(document.body) svg = d3.select(document.body)