diff --git a/src/packages/editor-stats/keymaps/editor-stats.cson b/src/packages/editor-stats/keymaps/editor-stats.cson index 1364f2098..819b7c04f 100644 --- a/src/packages/editor-stats/keymaps/editor-stats.cson +++ b/src/packages/editor-stats/keymaps/editor-stats.cson @@ -1,5 +1,2 @@ -'body, .editor-stats': - 'meta-alt-s': 'editor-stats:toggle' - -'.editor-stats': +'body': 'meta-alt-s': 'editor-stats:toggle' diff --git a/src/packages/editor-stats/spec/editor-stats-spec.coffee b/src/packages/editor-stats/spec/editor-stats-spec.coffee index deba8fe9e..b330f0073 100644 --- a/src/packages/editor-stats/spec/editor-stats-spec.coffee +++ b/src/packages/editor-stats/spec/editor-stats-spec.coffee @@ -2,7 +2,7 @@ $ = require 'jquery' RootView = require 'root-view' EditorStats = require 'editor-stats/src/editor-stats-view' -fdescribe "EditorStats", -> +describe "EditorStats", -> [rootView, editorStats, editor, date, time] = [] simulateKeyUp = (key) -> @@ -43,4 +43,3 @@ fdescribe "EditorStats", -> expect(editorStats.eventLog[time]).toBe 1 simulateClick() expect(editorStats.eventLog[time]).toBe 2 - diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index ca4c9e498..7f6b955d4 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -1,7 +1,5 @@ -{$$$} = require 'space-pen' ScrollView = require 'scroll-view' -$ = require 'jquery' -_ = require 'underscore' +d3 = require 'd3.v3' module.exports = class EditorStatsView extends ScrollView @@ -14,7 +12,6 @@ class EditorStatsView extends ScrollView "#{hour}:#{minute}" startDate = new Date - d3 = require 'd3.v3' x = d3.scale.ordinal().domain d3.range(hours * 60) y = d3.scale.linear() @@ -36,7 +33,7 @@ class EditorStatsView extends ScrollView @serialize: -> @instance.serialize() - eventLog: [], + eventLog: [] initialize: (@rootView, @eventLog = {}) -> super @@ -125,5 +122,4 @@ class EditorStatsView extends ScrollView detach: => super() - @remove() - @rootView.focus() \ No newline at end of file + @rootView.focus() diff --git a/src/packages/editor-stats/stylesheets/editor-stats.css b/src/packages/editor-stats/stylesheets/editor-stats.css index 57fdd5bf8..2f1da6516 100644 --- a/src/packages/editor-stats/stylesheets/editor-stats.css +++ b/src/packages/editor-stats/stylesheets/editor-stats.css @@ -40,4 +40,4 @@ .editor-stats path.domain { fill: none; -} \ No newline at end of file +}