Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
e59e9ed2
Commit
e59e9ed2
authored
Apr 08, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use alt-t for switching tab
parent
f8f6dbfe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
editor.js
src/app/editor/editor.js
+0
-18
editor-panel.js
src/app/panels/editor-panel.js
+5
-2
No files found.
src/app/editor/editor.js
View file @
e59e9ed2
...
...
@@ -130,24 +130,6 @@ class Editor {
readOnly
:
true
})
this
.
editor
.
commands
.
addCommand
({
name
:
'movenexttab'
,
bindKey
:
{
win
:
'Ctrl-Right'
,
mac
:
'Command-Right'
},
exec
:
(
editor
)
=>
{
this
.
event
.
trigger
(
'switchNextTab'
,
[])
},
readOnly
:
true
})
this
.
editor
.
commands
.
addCommand
({
name
:
'moveprevioustab'
,
bindKey
:
{
win
:
'Ctrl-Left'
,
mac
:
'Command-Left'
},
exec
:
(
editor
)
=>
{
this
.
event
.
trigger
(
'switchPreviousTab'
,
[])
},
readOnly
:
true
})
this
.
editor
.
setShowPrintMargin
(
false
)
this
.
editor
.
resize
(
true
)
...
...
src/app/panels/editor-panel.js
View file @
e59e9ed2
...
...
@@ -56,8 +56,6 @@ class EditorPanel {
self
.
_components
.
contextView
.
hide
()
self
.
_view
.
mainPanel
.
style
.
display
=
'block'
}
self
.
_components
.
editor
.
event
.
register
(
'switchNextTab'
,
()
=>
{
self
.
tabProxy
.
switchNextTab
()
})
self
.
_components
.
editor
.
event
.
register
(
'switchPreviousTab'
,
()
=>
{
self
.
tabProxy
.
switchPreviousTab
()
})
self
.
appManager
.
event
.
on
(
'ensureActivated'
,
(
name
)
=>
{
if
(
name
===
'home'
)
{
showApp
(
name
)
}
})
/*
We listen here on event from the tab component to display / hide the editor and mainpanel
...
...
@@ -192,6 +190,11 @@ class EditorPanel {
`
// INIT
self
.
_adjustLayout
(
'top'
,
self
.
data
.
_layout
.
top
.
offset
)
document
.
addEventListener
(
'keydown'
,
(
e
)
=>
{
if
(
e
.
altKey
&&
e
.
keyCode
===
84
)
self
.
tabProxy
.
switchNextTab
()
})
return
self
.
_view
.
el
}
registerCommand
(
name
,
command
,
opts
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment