chore(test): fix mock events patching argument

This commit is contained in:
Nico Rehwaldt 2015-10-20 10:50:48 +02:00 committed by pedesen
parent e1cd32fa91
commit 2807129585
1 changed files with 6 additions and 3 deletions

View File

@ -24,10 +24,13 @@ function createCanvasEvent(position, data) {
var target = canvas._svg;
var clientRect = canvas._container.getBoundingClientRect();
position.x += clientRect.left;
position.y += clientRect.top;
return createEvent(target, position, data);
var absolutePosition = {
x: position.x + clientRect.left,
y: position.y + clientRect.top
};
return createEvent(target, absolutePosition, data);
});
}