From 7ad32ef257be940db70664d42096f098168bf600 Mon Sep 17 00:00:00 2001
From: amandaghassaei <amandaghassaei@gmail.com>
Date: Wed, 31 May 2017 09:49:13 -0400
Subject: [PATCH] small changes

---
 index.html          |  3 ++-
 js/ViveInterface.js | 11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/index.html b/index.html
index 364da7c..db3c26c 100755
--- a/index.html
+++ b/index.html
@@ -712,7 +712,8 @@
             </div>
             <div id="virtualReality" class="hide indent smallTxt">
                 Status: &nbsp;<span id="VRstatus"></span><a class="about floatRight" href="#" id="aboutVR"><span class="fui-question-circle"></span></a>
-                <div id="VRoptions">
+                <div id="VRoptions"><br/>
+                    <a href="#" id="enterVR" class="displayBlock btn btn-lg btn-inverse"></a>
                 </div><br/><br/>
             </div><br/>
             <div>
diff --git a/js/ViveInterface.js b/js/ViveInterface.js
index 7b70170..b640826 100755
--- a/js/ViveInterface.js
+++ b/js/ViveInterface.js
@@ -56,14 +56,17 @@ function initViveInterface(globals){
     var scale = 0.5;
 
     function connect(){
+
         WEBVR.getVRDisplay( function ( display ) {
             if (!display) return;
             $status.html("VR device detected.");
             var button = WEBVR.getButton( display, globals.threeView.renderer.domElement );
-            $("#VRoptions").html(button);
+            var $link = $("#enterVR");
+            $link.html(button.textContent);
             var callback = button.onclick;
-            button.onclick = function () {
-				globals.vrEnabled = !display.isPresenting;
+            $link.click(function(e){
+                e.preventDefault();
+                globals.vrEnabled = !display.isPresenting;
                 var y = 0;
                 if (globals.vrEnabled) y = yOffset;
                 globals.threeView.modelWrapper.scale.set(scale, scale, scale);
@@ -76,7 +79,7 @@ function initViveInterface(globals){
                 });
                 setControllerEvents();
                 if (callback) callback();
-			};
+            });
         } );
     }
 
-- 
GitLab