Skip to content

Commit 416ac7d

Browse files
Fix toggleable button in hand-tracking example (#5504)
1 parent 509376f commit 416ac7d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/showcase/hand-tracking/button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AFRAME.registerComponent('button', {
33
schema: {
44
label: {default: 'label'},
55
width: {default: 0.11},
6-
toggable: {default: false}
6+
toggleable: {default: false}
77
},
88
init: function () {
99
var el = this.el;
@@ -58,7 +58,7 @@ AFRAME.registerComponent('button', {
5858
var el = this.el;
5959
el.setAttribute('material', {color: 'green'});
6060
el.emit('click');
61-
if (this.data.togabble) {
61+
if (this.data.toggleable) {
6262
if (el.is('pressed')) {
6363
el.removeState('pressed');
6464
} else {

examples/showcase/hand-tracking/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<a-entity id="sphereButton" button="label: sphere" position="-0.15 0 0"></a-entity>
5656
<a-entity id="boxButton" button="label: box" position="0 0 0"></a-entity>
5757
<a-entity id="torusButton" button="label: torus" position="0.15 0 0"></a-entity>
58-
<a-entity id="darkModeButton" button="label: Dark Mode; width: 0.20; toggable: true" position="0 -0.10 0"></a-entity>
58+
<a-entity id="darkModeButton" button="label: Dark Mode; width: 0.20; toggleable: true" position="0 -0.10 0"></a-entity>
5959
</a-entity>
6060
<a-entity hand-tracking-controls="hand: left"></a-entity>
6161
<a-entity hand-tracking-controls="hand: right"></a-entity>

examples/test/layer/button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AFRAME.registerComponent('button', {
33
schema: {
44
label: {default: 'label'},
55
width: {default: 0.50},
6-
toggable: {default: false}
6+
toggleable: {default: false}
77
},
88
init: function () {
99
var el = this.el;

0 commit comments

Comments
 (0)