Properly disable nextTick when calling requestAnimationFrame

My previous commit was nonsense because it set the ::performSyncUpdates
flag back to false before the animation frame callback ever got fired.

/cc again @benogle
This commit is contained in:
Ben Ogle
2014-06-23 22:35:40 -06:00
parent ccada33d57
commit d57119793b

View File

@@ -217,8 +217,9 @@ EditorComponent = React.createClass
requestAnimationFrame: (fn) ->
prevPerformSyncUpdates = @performSyncUpdates
@performSyncUpdates = true
requestAnimationFrame(fn)
@performSyncUpdates = prevPerformSyncUpdates
requestAnimationFrame =>
fn()
@performSyncUpdates = prevPerformSyncUpdates
getRenderedRowRange: ->
{editor, lineOverdrawMargin} = @props