Skip to content

Commit

Permalink
toogle: Update external changes
Browse files Browse the repository at this point in the history
Start spining after page loaded

Example to show to programmatically control properties

Change-Id: I140ec2892d3b2a4524183630984b6c7ee7fb6eb9
Bug: #17
Relate-to: https://github.com/rzr/webthing-iotjs/wiki/XR
Signed-off-by: Philippe Coval <[email protected]>
  • Loading branch information
rzr committed Mar 13, 2019
1 parent 8f3f440 commit 68c85b1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions dist/aframe-ui-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@
this.setValue(0);
}
}
},

update: function(old) {
if(this.data.value !== old.value) {
this.setValue(this.data.value);
}
}
};

Expand Down
2 changes: 1 addition & 1 deletion dist/aframe-ui-widgets.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions examples/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
clearInterval(interval);
}
});
setTimeout(function(){
toggleSwitch.setAttribute('ui-toggle', { value: 1 });
}, 1000);

// changes tubular radius
var rotaryKnob = document.querySelector('#rotaryKnob');
Expand Down
Loading

0 comments on commit 68c85b1

Please sign in to comment.