Explorar o código

Editor: Empty project title on clear.

Mr.doob %!s(int64=4) %!d(string=hai) anos
pai
achega
e07eca4c0b
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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 ) {
 
 	var config = editor.config;
+	var signals = editor.signals;
 	var strings = editor.strings;
 
 	var container = new UISpan();
@@ -69,6 +70,15 @@ function SidebarProject( editor ) {
 
 	}
 
+	// Signals
+
+	signals.editorCleared.add( function () {
+
+		title.setValue( '' );
+		config.setKey( 'project/title', '' );
+
+	} );
+
 	return container;
 
 }