Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
891164f1
Commit
891164f1
authored
Apr 05, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set `renderSideBySide` when creating diff instance
parent
bc64e20c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/assets/javascripts/ide/lib/editor.js
app/assets/javascripts/ide/lib/editor.js
+6
-1
spec/javascripts/ide/lib/editor_spec.js
spec/javascripts/ide/lib/editor_spec.js
+1
-0
No files found.
app/assets/javascripts/ide/lib/editor.js
View file @
891164f1
...
...
@@ -69,6 +69,7 @@ export default class Editor {
occurrencesHighlight
:
false
,
renderLineHighlight
:
'
none
'
,
hideCursorInOverviewRuler
:
true
,
renderSideBySide
:
this
.
renderSideBySide
(
domElement
),
})),
);
...
...
@@ -177,11 +178,15 @@ export default class Editor {
if
(
!
this
.
isDiffEditorType
)
return
;
this
.
instance
.
updateOptions
({
renderSideBySide
:
this
.
instance
.
getDomNode
().
offsetWidth
>=
700
,
renderSideBySide
:
this
.
renderSideBySide
(
this
.
instance
.
getDomNode
())
,
});
}
get
isDiffEditorType
()
{
return
this
.
instance
.
getEditorType
()
===
'
vs.editor.IDiffEditor
'
;
}
renderSideBySide
(
domElement
)
{
return
domElement
.
offsetWidth
>=
700
;
}
}
spec/javascripts/ide/lib/editor_spec.js
View file @
891164f1
...
...
@@ -77,6 +77,7 @@ describe('Multi-file editor library', () => {
renderLineHighlight
:
'
none
'
,
hideCursorInOverviewRuler
:
true
,
wordWrap
:
'
on
'
,
renderSideBySide
:
true
,
});
});
});
...
...
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