File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 187187
188188 var timeout ;
189189
190- var saveState = function ( scene ) {
190+ function saveState ( scene ) {
191191
192192 if ( editor . config . getKey ( 'autosave' ) === false ) {
193193
215215
216216 var signals = editor . signals ;
217217
218- signals . editorCleared . add ( saveState ) ;
219218 signals . geometryChanged . add ( saveState ) ;
220219 signals . objectAdded . add ( saveState ) ;
221220 signals . objectChanged . add ( saveState ) ;
Original file line number Diff line number Diff line change @@ -411,6 +411,7 @@ Editor.prototype = {
411411 clear : function ( ) {
412412
413413 this . history . clear ( ) ;
414+ this . storage . clear ( ) ;
414415
415416 this . camera . position . set ( 500 , 250 , 500 ) ;
416417 this . camera . lookAt ( new THREE . Vector3 ( ) ) ;
Original file line number Diff line number Diff line change @@ -76,14 +76,14 @@ var Storage = function () {
7676
7777 } ,
7878
79- clear : function ( callback ) {
79+ clear : function ( ) {
8080
8181 var transaction = database . transaction ( [ 'states' ] , 'readwrite' ) ;
8282 var objectStore = transaction . objectStore ( 'states' ) ;
8383 var request = objectStore . clear ( ) ;
8484 request . onsuccess = function ( event ) {
8585
86- callback ( ) ;
86+ console . log ( '[' + / \d \d \: \d \d \: \d \d / . exec ( new Date ( ) ) [ 0 ] + ']' , 'Cleared IndexedDB.' ) ;
8787
8888 } ;
8989
You can’t perform that action at this time.
0 commit comments