Skip to content

Commit

Permalink
solve screenbound issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Soravis committed Nov 17, 2015
1 parent bb25fba commit b51833b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/eyex-chrome.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/chromeapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</div>
<button id="btn-tracker-info">Tracker Info</button>
<button id="btn-calibrate">Calibrate</button>
<div id="gaze"></div>

<script src="/scripts/jquery-2.1.4.min.js"></script>
<script src="/scripts/eyex-chrome.js"></script>
Expand Down
11 changes: 6 additions & 5 deletions examples/chromeapp/scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
window.addEventListener('load', function(){

var eyeTracker = new TobiiEyeX({
nativeScreenWidth: 1920,
nativeScreenHeight: 1080,
senzeScreenWidth: window.innerWidth,
senzeScreenHeight: window.innerHeight,
browserScreenWidth: window.innerWidth,
browserScreenHeight: window.innerHeight,
onFrameCallback: function(frame){
//console.log(frame);
$('#results').html(JSON.stringify(frame));
},

$('#gaze').css('left', frame.smoothXY.x + 'px');
$('#gaze').css('top', frame.smoothXY.y + 'px');
},
onBlinkCallback: function(e){
//Do Nothing
}
Expand Down
Loading

0 comments on commit b51833b

Please sign in to comment.