From 5eb5d46a38ef75c4a5ed92b4dfbb04a0cf046e84 Mon Sep 17 00:00:00 2001 From: Eelco Lempsink Date: Wed, 29 Jun 2016 11:32:14 +0200 Subject: [PATCH] Rename MIDIControl to MIDIComponent --- framer/Framer.coffee | 2 +- framer/{MIDIControl.coffee => MIDIComponent.coffee} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename framer/{MIDIControl.coffee => MIDIComponent.coffee} (81%) diff --git a/framer/Framer.coffee b/framer/Framer.coffee index 1087ae954..791cc04b3 100644 --- a/framer/Framer.coffee +++ b/framer/Framer.coffee @@ -16,7 +16,7 @@ Framer.Animation = (require "./Animation").Animation Framer.AnimationGroup = (require "./AnimationGroup").AnimationGroup Framer.Screen = (require "./Screen").Screen Framer.Align = (require "./Align").Align -Framer.MIDIControl = (require "./MIDIControl").MIDIControl +Framer.MIDIComponent = (require "./MIDIComponent").MIDIComponent Framer.print = (require "./Print").print # Components diff --git a/framer/MIDIControl.coffee b/framer/MIDIComponent.coffee similarity index 81% rename from framer/MIDIControl.coffee rename to framer/MIDIComponent.coffee index 96c51dab6..c97d857c5 100644 --- a/framer/MIDIControl.coffee +++ b/framer/MIDIComponent.coffee @@ -3,9 +3,9 @@ {Events} = require "./Events" {MIDIInput} = require "./MIDIInput" -Events.MIDIControlValueChange = "MIDIControlValueChange" +Events.MIDIComponentValueChange = "MIDIComponentValueChange" -class MIDIControl extends BaseClass +class MIDIComponent extends BaseClass @define "min", @simpleProperty("min", 0) @define "max", @simpleProperty("max", 127) @@ -45,11 +45,11 @@ class MIDIControl extends BaseClass info = _.defaults info, type: "note" - @emit(Events.MIDIControlValueChange, @_modulate(data2), info) + @emit(Events.MIDIComponentValueChange, @_modulate(data2), info) _modulate: (value) -> Utils.modulate(value, [0, 127], [@min, @max]) - onValueChange: (cb) -> @on(Events.MIDIControlValueChange, cb) + onValueChange: (cb) -> @on(Events.MIDIComponentValueChange, cb) -exports.MIDIControl = MIDIControl +exports.MIDIComponent = MIDIComponent