Browse Source

Editor: Empty project title on clear.

Mr.doob 4 years ago
parent
commit
e07eca4c0b
1 changed files with 10 additions and 0 deletions
  1. 10 0
      editor/js/Sidebar.Project.js

+ 10 - 0
editor/js/Sidebar.Project.js

@@ -7,6 +7,7 @@ import { SidebarProjectVideo } from './Sidebar.Project.Video.js';
 function SidebarProject( editor ) {
 function SidebarProject( editor ) {
 
 
 	var config = editor.config;
 	var config = editor.config;
+	var signals = editor.signals;
 	var strings = editor.strings;
 	var strings = editor.strings;
 
 
 	var container = new UISpan();
 	var container = new UISpan();
@@ -69,6 +70,15 @@ function SidebarProject( editor ) {
 
 
 	}
 	}
 
 
+	// Signals
+
+	signals.editorCleared.add( function () {
+
+		title.setValue( '' );
+		config.setKey( 'project/title', '' );
+
+	} );
+
 	return container;
 	return container;
 
 
 }
 }