some refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-01-16 18:16:07 +03:00
parent d5ef01b144
commit ae2cb9af7b
2 changed files with 19 additions and 7 deletions

View File

@ -154,18 +154,18 @@ module.GLOBAL_KEYBOARD2 = {
meta_Q: 'close',
// XXX
F5: keyboard.doc('Reload viewer (full)',
F5: 'reload!: "full"',
/*F5: keyboard.doc('Reload viewer (full)',
function(){
//a.stop()
/*
killAllWorkers()
.done(function(){
reload()
})
*/
//killAllWorkers()
// .done(function(){
// reload()
// })
location.reload()
return false
}),
//*/
F12: 'showDevTools',
// NOTE: these are for systems where F** keys are not available

View File

@ -331,6 +331,18 @@ module.ViewerActions = actions.Actions({
// - we depend on the internals of a custom add-on feature
reload: ['Interface/Reload viewer',
function(force){
// full reload...
if(force == 'full'){
//this.stop()
/*
killAllWorkers()
.done(function(){
reload()
})
*/
location.reload()
}
this.ribbons.preventTransitions()
// NOTE: this essentially sets the update threshold to 0...