Skip to content

Commit ae6308f

Browse files
committed
Update debug code
1 parent c49b041 commit ae6308f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/jasmine/tests/sankey_test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ describe('sankey tests', function() {
11381138

11391139
function _makeWrapper(eventType, mouseFn) {
11401140
var posByElementType = {
1141-
node: [429, 279],
1141+
node: [415, 279],
11421142
link: [450, 300]
11431143
};
11441144

@@ -1311,7 +1311,10 @@ describe('sankey tests', function() {
13111311
var rect = n.querySelector('.node-rect');
13121312
if(rect) {
13131313
var r = rect.getBoundingClientRect();
1314-
console.log('node', i, 'rect', {x: (r.left + r.right) / 2, y: (r.top + r.bottom) / 2, w: r.width, h: r.height});
1314+
var cx = (r.left + r.right) / 2;
1315+
var cy = (r.top + r.bottom) / 2;
1316+
var el = document.elementFromPoint(cx, cy);
1317+
console.log('node', i, 'rect', {x: cx, y: cy, w: r.width, h: r.height, elementFromPoint: el, class: el && el.className.baseVal});
13151318
}
13161319
});
13171320
})

0 commit comments

Comments
 (0)