mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
test
This commit is contained in:
parent
fc465bfe46
commit
ced2ce7880
@ -24,6 +24,7 @@ import NumberControllerBox from './controllers/NumberControllerBox';
|
||||
import NumberControllerSlider from './controllers/NumberControllerSlider';
|
||||
import FunctionController from './controllers/FunctionController';
|
||||
import ColorController from './controllers/ColorController';
|
||||
import CustomController from './controllers/CustomController';
|
||||
|
||||
import domImport from './dom/dom';
|
||||
import GUIImport from './gui/GUI';
|
||||
@ -43,7 +44,8 @@ export const controllers = {
|
||||
NumberControllerBox: NumberControllerBox,
|
||||
NumberControllerSlider: NumberControllerSlider,
|
||||
FunctionController: FunctionController,
|
||||
ColorController: ColorController
|
||||
ColorController: ColorController,
|
||||
CustomController: CustomController
|
||||
};
|
||||
|
||||
export const dom = { dom: domImport };
|
||||
|
@ -25,6 +25,7 @@
|
||||
var NumberControllerSlider = dat.controllers.NumberControllerSlider;
|
||||
var FunctionController = dat.controllers.FunctionController;
|
||||
var ColorController = dat.controllers.ColorController;
|
||||
var CustomController = dat.controllers.CustomController;
|
||||
var GUI = dat.gui.GUI;
|
||||
|
||||
|
||||
@ -863,6 +864,22 @@ console.log(c2.__checkbox.getAttribute('checked'));
|
||||
document.body.removeChild(c1.domElement);
|
||||
});
|
||||
*/
|
||||
module("CustomController");
|
||||
test("Get Custom", function () {
|
||||
var value = 'value',
|
||||
c1 = new CustomController({
|
||||
constructor: function (controller) {
|
||||
var input = document.createElement('input');
|
||||
input.value = value;
|
||||
controller.domElement.appendChild(input);
|
||||
}
|
||||
});
|
||||
document.body.appendChild(c1.domElement);
|
||||
var input = c1.domElement.getElementsByTagName("input")[0];
|
||||
equal(input.value, value , "Input value is the same as the " + value);
|
||||
document.body.removeChild(c1.domElement);
|
||||
});
|
||||
|
||||
module("Controller Events");
|
||||
|
||||
test("onChange", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user