Start a new topic

HtmlDrawable click with drawable snapped to screen not working correctly

HtmlDrawable click with drawable snapped to screen not working correctly
1 Comment



I have created a very simple html with 4 buttons. and i am using html drawable with snap to screen enabled. Everything works very fine when target is on site of the AR view. But as long as the target is moved and drawable is snapped to screen , the click on buttons stop working when click over them and  if i click slightly above the button. the click works and event get triggerd respectively. 

So overall it seems some kind of miscalculation with the position of the elements in html drawable and mapped click event.  Please find the peice of code i am using. Is there any way to dig around this issue ?

World.htmlDrawable = new AR.HtmlDrawable({uri:"test.html" }, 1, {
viewportWidth: 320,
viewportHeight: 240,
backgroundColor: "#FFFFFF",
offsetX: 0,
offsetY: 0,
clickThroughEnabled: true,
allowDocumentLocationChanges: false,
onDocumentLocationChanged: function onDocumentLocationChangedFn(uri) {



<!DOCTYPE html>

<html lang="en">


    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="target-densitydpi=device-dpi, width = 320, user-scalable = 0">

    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->




<input type="button" name="test1" id="test1" value="This is text 1" onClick="location.href='http://text1'">

<input type="button" name="test2" id="test2" value="This is text 2" onClick="location.href='http://text2'">

<input type="button" name="test3" id="test3" value="This is text 3" onClick="location.href='http://text3'">

<input type="button" name="test4" id="test4" value="This is text 4" onClick="location.href='http://text4'">







Vivek Sharma
Login or Signup to post a comment