mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 17:08:21 +08:00
Updated a test code for dat-gui.
This commit is contained in:
@@ -157,3 +157,19 @@ var FizzyText = function () {
|
||||
|
||||
update();
|
||||
}
|
||||
// ------------ 11. Object Literal Tests
|
||||
() => {
|
||||
var obj = {a:1,b:1};
|
||||
var gui = new dat.GUI();
|
||||
var controller = gui.add(obj, 'maxSize', 0, 10);
|
||||
|
||||
controller.onChange(function (value) {
|
||||
// Fires on every change, drag, keypress, etc.
|
||||
});
|
||||
|
||||
controller.onFinishChange(function (value) {
|
||||
// Fires when a controller loses focus.
|
||||
alert("The new value is " + value);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user