diff --git a/code/index.html b/code/index.html
index a2370fc..ad5ebd2 100644
--- a/code/index.html
+++ b/code/index.html
@@ -330,10 +330,11 @@
*/
function rotationManager(e)
{
+ var mouseOnRes = mousePos[0].match(/[R]/g)!=null;
canvasNumber=e.currentTarget.id.substring(6);
document.getElementById("canvas"+mousePos[0]).classList.remove('vitrail-select');
- if(mousePos[0].match(/[R]/g)!=null && canvasNumber!="R")
+ if(mouseOnRes && canvasNumber!="R")
{
if(!isVisible(canvasNumber))
{
@@ -445,6 +446,8 @@
function isVisible(what)
{
+ if(what.includes("R"))
+ return eval("tabR["+what.substring(1)+"][0]");
return eval("tab"+what+"[0]");
}