From 8edf5d0cc76ffb9d4c4f3fd9297e2b6fb960d01a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 4 Oct 2010 17:01:53 -0400 Subject: [PATCH] If the Actor is on a directory, open the panel so that the mouse is over the Open button. --- web_frontend/file.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/web_frontend/file.js b/web_frontend/file.js index 54ec108..21c6966 100644 --- a/web_frontend/file.js +++ b/web_frontend/file.js @@ -138,7 +138,7 @@ armadillo.File.prototype.move = function(dest) { }; /** - * Click handler for the list element. + * Click handler for the link element; only for directories. * @param {Event} e */ armadillo.File.prototype.clickHandler_ = function(e) { @@ -152,7 +152,7 @@ armadillo.File.prototype.clickHandler_ = function(e) { }; /** - * Click handler for the button element. + * Click handler for the row, which brings up the Actor interface. * @param {Event} e */ armadillo.File.prototype.actorHandler_ = function(e) { @@ -160,7 +160,15 @@ armadillo.File.prototype.actorHandler_ = function(e) { return; e.stopPropagation(); var actor = new armadillo.Actor(this); - actor.show(e.clientX, e.clientY); + // Adjust the mouse position so that if "Open" is the first tile, it is easy + // to navigate. + var x = e.clientX; + var y = e.clientY; + if (this.isDirectory()) { + x -= 20; + y -= 20; + } + actor.show(x, y); }; /** -- 2.43.5