changeset 91:f87363889015

Fixed calculation of the highlight bounds in viewport-miniature.
author Mikhail Kryshen <mikhail@kryshen.net>
date Mon, 06 Dec 2010 19:57:22 +0300
parents dd7b8dbb20bc
children bf4a46f80851
files src/net/kryshen/indyvon/layers.clj
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/net/kryshen/indyvon/layers.clj	Sun Nov 28 03:46:59 2010 +0300
+++ b/src/net/kryshen/indyvon/layers.clj	Mon Dec 06 19:57:22 2010 +0300
@@ -294,8 +294,8 @@
       (let [size (layer-size (:content viewport))
             s (scaling (:width size) (:height size) width height)
             [x y w h] (viewport-visible-bounds viewport)
-            x (* x s)
-            y (* y s)
+            x (* (+ x (align-x (:width size) (/ width s) :center)) s)
+            y (* (+ y (align-y (:height size) (/ height s) :center)) s)
             w (* w s)
             h (* h s)]
         (with-color :alt-back-color