mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
35 lines
485 B
JavaScript
35 lines
485 B
JavaScript
Polymer( 'controller-option', {
|
|
|
|
ready: function() {
|
|
|
|
this.options = {};
|
|
|
|
},
|
|
|
|
init: function( options ) {
|
|
|
|
if ( Array.isArray( options ) ){
|
|
|
|
options.forEach( function( opt ) {
|
|
|
|
this.options[ opt ] = opt;
|
|
|
|
}, this );
|
|
|
|
} else {
|
|
|
|
this.options = options;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getKeys: function( object ) {
|
|
|
|
if ( object ) return Object.keys( object );
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|