First implementation of tool tester

This commit is contained in:
jdescottes
2014-08-21 00:50:59 +02:00
parent 34dbcedec3
commit 1955d3f8f5
12 changed files with 422 additions and 30 deletions

View File

@@ -196,6 +196,28 @@
};
};
ns.FrameRenderer.prototype.reverseCoordinates = function(x, y) {
var cellSize = this.zoom;
x = x * cellSize;
y = y * cellSize;
x = x - this.offset.x * cellSize;
y = y - this.offset.y * cellSize;
x = x + this.margin.x;
y = y + this.margin.y;
var containerOffset = this.container.offset();
x = x + containerOffset.left;
y = y + containerOffset.top;
return {
x : x + (cellSize/2),
y : y + (cellSize/2)
};
};
/**
* @private
*/