提交 7fbe906f 编写于 作者: M Mr.doob

Editor: Fixed File/New when autosave disabled.

上级 46d0293c
......@@ -187,7 +187,7 @@
var timeout;
var saveState = function ( scene ) {
function saveState( scene ) {
if ( editor.config.getKey( 'autosave' ) === false ) {
......@@ -215,7 +215,6 @@
var signals = editor.signals;
signals.editorCleared.add( saveState );
signals.geometryChanged.add( saveState );
signals.objectAdded.add( saveState );
signals.objectChanged.add( saveState );
......
......@@ -411,6 +411,7 @@ Editor.prototype = {
clear: function () {
this.history.clear();
this.storage.clear();
this.camera.position.set( 500, 250, 500 );
this.camera.lookAt( new THREE.Vector3() );
......
......@@ -76,14 +76,14 @@ var Storage = function () {
},
clear: function ( callback ) {
clear: function () {
var transaction = database.transaction( [ 'states' ], 'readwrite' );
var objectStore = transaction.objectStore( 'states' );
var request = objectStore.clear();
request.onsuccess = function ( event ) {
callback();
console.log( '[' + /\d\d\:\d\d\:\d\d/.exec( new Date() )[ 0 ] + ']', 'Cleared IndexedDB.' );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册