Explorar el Código

UI: Added Panel.clear()

Mr.doob hace 12 años
padre
commit
321b685f4a
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10 0
      editor/js/libs/ui.js

+ 10 - 0
editor/js/libs/ui.js

@@ -126,6 +126,16 @@ UI.Panel.prototype.remove = function () {
 
 
 };
 };
 
 
+UI.Panel.prototype.clear = function () {
+
+	while ( this.dom.children.length ) {
+
+		this.dom.removeChild( this.dom.lastChild );
+
+	}
+
+};
+
 // Text
 // Text
 
 
 UI.Text = function ( text ) {
 UI.Text = function ( text ) {

粤ICP备19079148号