Do not allow root view to set a font-size less than 1

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-06-15 17:27:42 -07:00
parent db69ee5627
commit c02e5bbdbf
2 changed files with 8 additions and 0 deletions

View File

@@ -155,6 +155,7 @@ class RootView extends View
super
setFontSize: (newFontSize) ->
newFontSize = Math.max(1, newFontSize)
[oldFontSize, @fontSize] = [@fontSize, newFontSize]
@trigger 'font-size-change' if oldFontSize != newFontSize