mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Redraw graph on window resize events
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
ScrollView = require 'scroll-view'
|
||||
d3 = require 'd3.v3'
|
||||
_ = require 'underscore'
|
||||
$ = require 'jquery'
|
||||
|
||||
module.exports =
|
||||
class EditorStatsView extends ScrollView
|
||||
@@ -13,6 +15,8 @@ class EditorStatsView extends ScrollView
|
||||
initialize: (@rootView) ->
|
||||
super
|
||||
|
||||
@subscribe $(window), 'resize', _.debounce((=> @draw()), 300)
|
||||
|
||||
draw: ->
|
||||
@editorStats.empty()
|
||||
@x ?= d3.scale.ordinal().domain d3.range(@stats.hours * 60)
|
||||
|
||||
Reference in New Issue
Block a user