dat.gui/elements/controller-option/controller-option.js
George Michael Brower 1dca89383b controller-option
2014-09-07 16:18:36 -04:00

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 );
}
});