[Yt-svn] commit/yt: samskillman: normalize the transpose. there are probably better ways to do this.

Bitbucket commits-noreply at bitbucket.org
Fri Apr 15 16:27:38 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/d214db4d8ead/
changeset:   r4147:d214db4d8ead
branch:      yt
user:        samskillman
date:        2011-04-16 01:27:28
summary:     normalize the transpose.  there are probably better ways to do this.
affected #:  1 file (24 bytes)

--- a/yt/gui/reason/html/js/widget_gridviewer.js	Fri Apr 15 18:52:15 2011 -0400
+++ b/yt/gui/reason/html/js/widget_gridviewer.js	Fri Apr 15 17:27:28 2011 -0600
@@ -103,8 +103,9 @@
                 updateBasedOnOffset(c, off);
                 c.update();
                 } else if (e.event.button = 2){ // Right click - transpose
-                var move_up = c.up.scale(-(e.y-this.curY)/200.);
-                var move_over = horiz.scale(-(e.x-this.curX)/200.);
+		    var tscale = 1.0*off.norm()/512.;
+		    var move_up = c.up.scale(-(e.y-this.curY)*tscale);
+		    var move_over = horiz.scale(-(e.x-this.curX)*tscale);
                 c.position.$add(move_up);
                 c.position.$add(move_over);
                 c.target.$add(move_up);

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list