dat.gui/elements/dat-gui-folder/dat-gui-folder.js

29 lines
564 B
JavaScript
Raw Permalink Normal View History

2014-10-11 19:39:16 +00:00
/* globals Polymer */
Polymer( 'dat-gui-folder', {
parent: null,
open: false,
add: function() {
var controller = this.parent.add.apply( this.parent, arguments );
this.appendChild( controller.row );
return controller;
},
var: function() {
var controller = this.parent.var.apply( this.parent, arguments );
this.appendChild( controller.row );
return controller;
},
// Events
// -------------------------------
tap: function() {
this.open = !this.open
}
} );