Skip to content

Commit 68c85b1

Browse files
committed
toogle: Update external changes
Start spining after page loaded Example to show to programmatically control properties Change-Id: I140ec2892d3b2a4524183630984b6c7ee7fb6eb9 Bug: caseyyee#17 Relate-to: https://github.com/rzr/webthing-iotjs/wiki/XR Signed-off-by: Philippe Coval <p.coval@samsung.com>
1 parent 8f3f440 commit 68c85b1

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

dist/aframe-ui-widgets.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@
329329
this.setValue(0);
330330
}
331331
}
332+
},
333+
334+
update: function(old) {
335+
if(this.data.value !== old.value) {
336+
this.setValue(this.data.value);
337+
}
332338
}
333339
};
334340

dist/aframe-ui-widgets.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/basic/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@
9595
clearInterval(interval);
9696
}
9797
});
98+
setTimeout(function(){
99+
toggleSwitch.setAttribute('ui-toggle', { value: 1 });
100+
}, 1000);
98101

99102
// changes tubular radius
100103
var rotaryKnob = document.querySelector('#rotaryKnob');

0 commit comments

Comments
 (0)