Skip to content

Commit

Permalink
Add note about order of click handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Joel authored and cdata committed Aug 7, 2019
1 parent 8ef495c commit 7a96e82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/features/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ configuration or device capabilities');

if (showArButton) {
this[$arButtonContainer].classList.add('enabled');
// NOTE(cdata): The order of the two click handlers on the "ar
// button container" is important, vital to the workaround described
// earlier in this file. Reversing their order will cause our Scene
// Viewer integration to break.
// @see https://github.com/GoogleWebComponents/model-viewer/issues/693
this[$arButtonContainer].addEventListener(
'click', this[$arButtonContainerClickHandler]);
this[$arButtonContainer].addEventListener(
Expand Down

0 comments on commit 7a96e82

Please sign in to comment.