Start a new topic

HTMLDrawable click events

HTMLDrawable click events


I didn't found the time to check this. It would help if you could upload a complete sample (zipped). From the screenshot i'm guessing the problem shows on ios? Did you also try it on android?

Where you able attach click events to floated elements in an HTMLDrawable object?

Thanks, i will try the viewportWidth idea. 

If you want to display information fullscreen, you can use AR.context.openInBrowser function. This will open the browser to display the specified url.

getDistance is not defined for a Trackable2dObject and was added by mistake to this class. This will be fixed by removing it in the next version.

You can increase the viewportWidth of the HTMLDrawable to make it more crisp. Be careful with the how large you make it, as it might have a performance impact.

I'm testing this on iOS, and i have attached my htmlDrawable file. Also here is the code i'm using to display it.  I set the Update Rate to medium, since when it was static i didn't see any alert messages show up for me.  

 

 

AR.context.onLocationChanged = function(lat, long, alt, accuracy){

                var poiHTMLdrawable = new AR.HtmlDrawable({uri:"productDisplay.html"}, 5,

                                                          {scale:1, updateRate:AR.HtmlDrawable.UPDATE_RATE.MEDIUM, clickThroughEnabled:true, width:600})

                var myGeoLocation = new AR.RelativeLocation(null, -100, 20, 0);

                var geoObject = new AR.GeoObject(myGeoLocation, {drawables: {cam: poiHTMLdrawable }});

            }

 

Also, how do i get it to display full screen?   I also have noticed that i can't call getDistance on the tracker2DObject, it always sayes undefined and i see this error in the console found no interface to handle request: 'AR.i.trackable2DObjectInterface.getDistance'. I also have noticed that the HTMLDrawable is very blurry, is this caused by the trial, i have attched a screen shot showing this.

Thank you for your help.

I'm not aware of such a problem. Can you verify that the clicks are working on other elements of the same htmldrawable without changing anything else? To test and debug it on our side a short sample would be great.

What platforms did you test this on?

i'm trying to create a htmDrawable, and inside of that i want to layout my HTML template for my data, and add click events in to different elements with jQuery, but some of the elements have to be floated, and when they are, they don't capture the clicks. I have set the HTMLDrawable to pass the clicks through to true. It also seems like the click events are not caputred currectly on the div's when they are not floated, is this possible, or do i need to create a bunch of different HTMLDrawables and try and line them up correctly?

 

Thanks.
Login or Signup to post a comment