Skip to content

Commit

Permalink
Found an issue with event listeners. Need to resolve before this upda…
Browse files Browse the repository at this point in the history
…te can be merged. Pushing to github so others may check it out.
  • Loading branch information
RealismCloud committed Sep 15, 2016
1 parent 7293b02 commit e5bd89f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
17 changes: 0 additions & 17 deletions src/nodes/PointingDeviceSensor/LookSensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,6 @@ x3dom.registerNodeType(
return matchingObjs;
},

/*
* Countdown timer on the selected object
* Makes sure that the first initially found object is
* still the first object; otherwise reset
* Generate event if at final stage
* Otherwise increment countdown stage
*/
'countdown' : function()
{
var currentObjects = x3dom.singleUse.LookSensor.getObjectsClass(x3dom.singleUse.LookSensor.display.topLeft, x3dom.singleUse.LookSensor.display.bottomRight, x3dom.singleUse.LookSensor.enabledLookSensor._vf.objectClass);
Expand Down Expand Up @@ -259,16 +252,6 @@ x3dom.registerNodeType(
x3dom.singleUse.LookSensor.display.center[1],
1, 1
);
/*
* this.x3dElement.context.runtime.canvas.canvas is the canvas
* this.x3dElement.context.runtime.canvas.doc is the is needed for accessing various things
* this.x3dElement.context.runtime.canvas.doc._viewarea is the is the Viewarea
* x3dom.X3DDocument.prototype.onMouseRelease = function (ctx, x, y, buttonState, prevButton) {...}
*
* this.x3dElement.runtime.canvas.doc.onMouseRelease (
* this.x3dElement.runtime.canvas.gl,
* x, y, 1, 1); // for "left" button press & release
*/
}
};
var targetHtml = "<div id='x3dom_LookSensor_target' style='display:none; position:relative; z-index:32000;'><div class='x3dom_LookSensor_border1'><div class='x3dom_LookSensor_border2'>";
Expand Down
13 changes: 10 additions & 3 deletions test/LookSensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
flags.X3D = tf[flags.X3D];

if (flags.DESKTOP) {
//alert ('Loading jQuery-ui');
document.writeln ('<scri' + 'pt src="lib/jquery-ui-1.11.4/jquery-ui.js"></scr' + 'ipt>');
document.writeln ('<link rel="stylesheet" type="text/css" href="lib/jquery-ui-1.11.4/jquery-ui.css">');
}
Expand Down Expand Up @@ -168,11 +167,19 @@ <h3>Debug log</h3>
function clickBox (t) {
jQuery('#log_debug').prepend('<div>Box click handler</div>');
}
function clickShape (ev) {
jQuery('#log_debug').prepend('<div>Shaoe Event handler</div>');
}
function clickHandler (ev) {
jQuery('#log_debug').prepend('<div>Event handler</div>');
}
var e = document.getElementById('x3dElement');
e.addEventListener('click', clickHandler, false);
var e = document.getElementById('right_cone');
e.addEventListener('click', clickShape, false);
var e = document.getElementById('center_box');
e.addEventListener('click', clickShape, false);
var e = document.getElementById('left_sphere');
e.addEventListener('click', clickShape, false);

e = document.getElementById('goFullScreen');
e.addEventListener('click', clickHandler, false);
e = document.getElementById('center_box');
Expand Down

0 comments on commit e5bd89f

Please sign in to comment.