Improved init task rendering, reduced dom operations.
This commit is contained in:
parent
6b3d1612a8
commit
1439588581
2 changed files with 11 additions and 2 deletions
|
@ -542,9 +542,11 @@ class App.Controller extends Spine.Controller
|
|||
@html App.view('generic/error/unauthorized')(data)
|
||||
|
||||
metaTaskUpdate: ->
|
||||
delay = App.TaskManager.renderDelay()
|
||||
return if !delay
|
||||
App.Delay.set(
|
||||
-> App.Event.trigger 'task:render'
|
||||
App.TaskManager.renderDelay()
|
||||
delay
|
||||
'meta-task-update'
|
||||
)
|
||||
|
||||
|
|
|
@ -496,10 +496,17 @@ class _taskManagerSingleton extends App.Controller
|
|||
'task'
|
||||
)
|
||||
|
||||
# set new renderDelayTime
|
||||
# handle init task rendering at loading time, prevent multible, not needed dom operations
|
||||
@initTaskRenderInterval = App.Interval.set(
|
||||
->
|
||||
App.Event.trigger('task:render')
|
||||
1200
|
||||
)
|
||||
App.Delay.set(
|
||||
=>
|
||||
App.Interval.clear(@initTaskRenderInterval)
|
||||
@renderDelayTime = 20
|
||||
App.Event.trigger('task:render')
|
||||
task_count * 450
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue