mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Use a getterSetter to manage int values in settings.
This commit is contained in:
parent
669c705d32
commit
ddee75e479
2 changed files with 7 additions and 1 deletions
|
@ -136,7 +136,8 @@ aside#left-menu.full-size(
|
|||
label(for="fontSize") #{translate("font_size")}
|
||||
select(
|
||||
name="fontSize"
|
||||
ng-model="settings.fontSize"
|
||||
ng-model="fontSizeAsStr"
|
||||
ng-model-options="{ getterSetter: true }"
|
||||
)
|
||||
each size in ['10','11','12','13','14','16','20','24']
|
||||
option(value=size) #{size}px
|
||||
|
|
|
@ -8,6 +8,11 @@ define [
|
|||
if $scope.settings.pdfViewer not in ["pdfjs", "native"]
|
||||
$scope.settings.pdfViewer = "pdfjs"
|
||||
|
||||
$scope.fontSizeAsStr = (newVal) ->
|
||||
if newVal?
|
||||
$scope.settings.fontSize = newVal
|
||||
return $scope.settings.fontSize.toString()
|
||||
|
||||
$scope.$watch "settings.theme", (theme, oldTheme) =>
|
||||
if theme != oldTheme
|
||||
settings.saveSettings({theme: theme})
|
||||
|
|
Loading…
Reference in a new issue