mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-18 01:35:10 +02:00
Resolves #147 Flip trees upside down with flip
This commit is contained in:
parent
108937aad5
commit
937977f232
12 changed files with 61 additions and 35 deletions
|
@ -2,6 +2,7 @@ var _ = require('underscore');
|
|||
var util = require('../util');
|
||||
|
||||
var constants = require('../util/constants');
|
||||
var GlobalState = require('../util/globalState');
|
||||
var intl = require('../intl');
|
||||
|
||||
var Commands = require('../commands');
|
||||
|
@ -23,7 +24,7 @@ var instantCommands = [
|
|||
});
|
||||
}],
|
||||
[/^(locale|locale reset)$/, function(bits) {
|
||||
constants.GLOBAL.locale = intl.getDefaultLocale();
|
||||
GlobalState.locale = intl.getDefaultLocale();
|
||||
var Main = require('../app').getEvents().trigger('localeChanged');
|
||||
|
||||
throw new CommandResult({
|
||||
|
@ -47,7 +48,7 @@ var instantCommands = [
|
|||
});
|
||||
}],
|
||||
[/^locale (\w+)$/, function(bits) {
|
||||
constants.GLOBAL.locale = bits[1];
|
||||
GlobalState.locale = bits[1];
|
||||
|
||||
var Main = require('../app').getEvents().trigger('localeChanged');
|
||||
throw new CommandResult({
|
||||
|
@ -57,6 +58,15 @@ var instantCommands = [
|
|||
)
|
||||
});
|
||||
}],
|
||||
[/^flip$/, function() {
|
||||
GlobalState.flipTreeY = !GlobalState.flipTreeY;
|
||||
|
||||
var events = require('../app').getEvents();
|
||||
events.trigger('refreshTree');
|
||||
throw new CommandResult({
|
||||
msg: intl.str('flip-tree-command')
|
||||
});
|
||||
}],
|
||||
[/^refresh$/, function() {
|
||||
var events = require('../app').getEvents();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue