P5-1416 add support for text-tags

This commit is contained in:
Martin
2017-06-26 15:35:30 +02:00
parent e79245e14e
commit e3e6019526
10 changed files with 39 additions and 36 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ function RulerHandler(viewport) {
var bounds = viewport.getBounds();
var pos = util.assertBetween(this[axis], bounds.min[axis], bounds.max[axis]);
this.marker[axis] = this[axis] = pos;
var dim = (this[axis] - bounds[axis]) / (viewport.getData().ppmm * 10);
var dim = (this[axis] - bounds[axis]) / (viewport.getData().ppmm * 10 * viewport.canvas.getImage().scaleX);
if (axis === 'top') {
dim = viewport.getData().dim.height - dim;