mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #542 from sharelatex/ja-match-front-to-v1
Update font and line spacing in Ace to match OL v1
This commit is contained in:
commit
78aefc2871
4 changed files with 16 additions and 0 deletions
|
@ -321,5 +321,7 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
||||||
chatMessageBorderLightness : if isOl then "40%" else "70%"
|
chatMessageBorderLightness : if isOl then "40%" else "70%"
|
||||||
chatMessageBgSaturation : if isOl then "85%" else "60%"
|
chatMessageBgSaturation : if isOl then "85%" else "60%"
|
||||||
chatMessageBgLightness : if isOl then "40%" else "97%"
|
chatMessageBgLightness : if isOl then "40%" else "97%"
|
||||||
|
editorFontFamily : if isOl then '\\"Lucida Console\\", monospace' else null
|
||||||
|
editorLineHeight : if isOl then 1.6 else null
|
||||||
renderAnnouncements : !isOl
|
renderAnnouncements : !isOl
|
||||||
next()
|
next()
|
||||||
|
|
|
@ -69,6 +69,8 @@ div.full-size(
|
||||||
track-changes= "editor.trackChanges",
|
track-changes= "editor.trackChanges",
|
||||||
doc-id="editor.open_doc_id"
|
doc-id="editor.open_doc_id"
|
||||||
renderer-data="reviewPanel.rendererData"
|
renderer-data="reviewPanel.rendererData"
|
||||||
|
font-family="ui.editorFontFamily"
|
||||||
|
line-height="ui.editorLineHeight"
|
||||||
)
|
)
|
||||||
|
|
||||||
!= moduleIncludes('editor:body', locals)
|
!= moduleIncludes('editor:body', locals)
|
||||||
|
|
|
@ -80,6 +80,8 @@ define [
|
||||||
miniReviewPanelVisible: false
|
miniReviewPanelVisible: false
|
||||||
chatResizerSizeOpen: window.uiConfig.chatResizerSizeOpen
|
chatResizerSizeOpen: window.uiConfig.chatResizerSizeOpen
|
||||||
chatResizerSizeClosed: window.uiConfig.chatResizerSizeClosed
|
chatResizerSizeClosed: window.uiConfig.chatResizerSizeClosed
|
||||||
|
editorFontFamily: window.uiConfig.editorFontFamily
|
||||||
|
editorLineHeight: window.uiConfig.editorLineHeight
|
||||||
}
|
}
|
||||||
$scope.user = window.user
|
$scope.user = window.user
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,8 @@ define [
|
||||||
trackChangesEnabled: "="
|
trackChangesEnabled: "="
|
||||||
docId: "="
|
docId: "="
|
||||||
rendererData: "="
|
rendererData: "="
|
||||||
|
lineHeight: "="
|
||||||
|
fontFamily: "="
|
||||||
}
|
}
|
||||||
link: (scope, element, attrs) ->
|
link: (scope, element, attrs) ->
|
||||||
# Don't freak out if we're already in an apply callback
|
# Don't freak out if we're already in an apply callback
|
||||||
|
@ -279,6 +281,14 @@ define [
|
||||||
"font-size": value + "px"
|
"font-size": value + "px"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
scope.$watch "fontFamily", (value) ->
|
||||||
|
if value?
|
||||||
|
editor.setOption('fontFamily', value)
|
||||||
|
|
||||||
|
scope.$watch "lineHeight", (value) ->
|
||||||
|
if value?
|
||||||
|
editor.container.style.lineHeight = value
|
||||||
|
|
||||||
scope.$watch "sharejsDoc", (sharejs_doc, old_sharejs_doc) ->
|
scope.$watch "sharejsDoc", (sharejs_doc, old_sharejs_doc) ->
|
||||||
if old_sharejs_doc?
|
if old_sharejs_doc?
|
||||||
detachFromAce(old_sharejs_doc)
|
detachFromAce(old_sharejs_doc)
|
||||||
|
|
Loading…
Reference in a new issue