From df4697b3cf52a774992f63db5111714381c41f09 Mon Sep 17 00:00:00 2001 From: "Peter A. Shevtsov" Date: Thu, 27 Feb 2014 16:19:42 +0700 Subject: [PATCH] Corrected rectangle position inside popup when direction is 'down' or 'right' --- g.raphael.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g.raphael.js b/g.raphael.js index 27f27ca..67b8cf8 100644 --- a/g.raphael.js +++ b/g.raphael.js @@ -105,9 +105,9 @@ Raphael.el.popup = function (dir, size, x, y) { xy = { up: { x: -!center * (bb.width / 2), y: -size * 2 - (center ? bb.height / 2 : bb.height) }, - down: { x: -!center * (bb.width / 2), y: size * 2 + (center ? bb.height / 2 : bb.height) }, + down: { x: -!center * (bb.width / 2), y: size * 2 + (center ? bb.height / 2 : 0) }, left: { x: -size * 2 - (center ? bb.width / 2 : bb.width), y: -!center * (bb.height / 2) }, - right: { x: size * 2 + (center ? bb.width / 2 : bb.width), y: -!center * (bb.height / 2) } + right: { x: size * 2 + (center ? bb.width / 2 : 0), y: -!center * (bb.height / 2) } }[dir]; this.translate(xy.x, xy.y);