id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
gss/engine:src/concepts/Continuation.coffee:2:raw_corpus
raw_corpus
<h1 id="h1"></h1> </header> <!-- Generated constraint key --> style$my-stylesheet # my stylesheet ↓ h1$h1 # found heading ↑ !+img # preceeded by image → #header # bound to header element### # When cleaning a path, also clean forks, rules and pairs ...
CoffeeScript
gss/engine
src/concepts/Continuation.coffee
MIT
5aa596c9cf990a0b753a83e89c00cd4175422b77
2,854
https://github.com/gss/engine/blob/5aa596c9cf990a0b753a83e89c00cd4175422b77/src/concepts/Continuation.coffee
58
107
gss/engine:src/concepts/Continuation.coffee:2:completion
completion
<h1 id="h1"></h1> </header> <!-- Generated constraint key --> style$my-stylesheet # my stylesheet ↓ h1$h1 # found heading ↑ !+img # preceeded by image → #header # bound to header element### # When cleaning a path, also clean forks, rules and pairs ...
"(?:" + Continuation::ASCEND + "|$)", "g") getCanonicalSelector: (selector) -> selector = selector.trim() selector = selector. replace(@CanonicalizeSelectorRegExp, ' '). replace(/\s+/g, @DESCEND). replace(@engine.Operation.CleanupSelectorRegExp, '') return selector CanonicalizeSelect...
CoffeeScript
CoffeeScript
gss/engine
src/concepts/Continuation.coffee
MIT
5aa596c9cf990a0b753a83e89c00cd4175422b77
2,854
https://github.com/gss/engine/blob/5aa596c9cf990a0b753a83e89c00cd4175422b77/src/concepts/Continuation.coffee
58
107
gss/engine:src/concepts/Continuation.coffee:3:raw_corpus
raw_corpus
bits.splice(bits.length - 1, 0, last.substring(0, index + id.length)) bits[bits.length - 1] = "" path = bits.join(@DESCEND) if continuation.charAt(0) == @PAIR path = @PAIR + path return path getParentScope: (scope, continuation) -> return scope._gss_id unless continuation bits = contin...
CoffeeScript
gss/engine
src/concepts/Continuation.coffee
MIT
5aa596c9cf990a0b753a83e89c00cd4175422b77
2,854
https://github.com/gss/engine/blob/5aa596c9cf990a0b753a83e89c00cd4175422b77/src/concepts/Continuation.coffee
108
157
gss/engine:src/concepts/Continuation.coffee:3:completion
completion
bits.splice(bits.length - 1, 0, last.substring(0, index + id.length)) bits[bits.length - 1] = "" path = bits.join(@DESCEND) if continuation.charAt(0) == @PAIR path = @PAIR + path return path getParentScope: (scope, continuation) -> return scope._gss_id unless continuation bits = contin...
if matched = last.match(@engine.pairs.TrailingIDRegExp) if matched[1].indexOf('"') > -1 return matched[1] return @engine.identity[matched[1]] return @engine.queries[bits.join(@DESCEND)] # Return path for given operation concat: (continuation, command, scope) -> if continuation? ...
CoffeeScript
CoffeeScript
gss/engine
src/concepts/Continuation.coffee
MIT
5aa596c9cf990a0b753a83e89c00cd4175422b77
2,854
https://github.com/gss/engine/blob/5aa596c9cf990a0b753a83e89c00cd4175422b77/src/concepts/Continuation.coffee
108
157
gss/engine:src/concepts/Continuation.coffee:4:raw_corpus
raw_corpus
Continuation::ASCEND + Continuation::DESCEND + Continuation::PAIR + "]$") for property, value of Continuation:: Continuation[property] = value
CoffeeScript
gss/engine
src/concepts/Continuation.coffee
MIT
5aa596c9cf990a0b753a83e89c00cd4175422b77
2,854
https://github.com/gss/engine/blob/5aa596c9cf990a0b753a83e89c00cd4175422b77/src/concepts/Continuation.coffee
158
165
gss/engine:src/concepts/Continuation.coffee:4:completion
completion
Continuation::ASCEND + Continuation::DESCEND + Continuation::PAIR + "]$")
for property, value of Continuation:: Continuation[property] = value
CoffeeScript
CoffeeScript
gss/engine
src/concepts/Continuation.coffee
MIT
5aa596c9cf990a0b753a83e89c00cd4175422b77
2,854
https://github.com/gss/engine/blob/5aa596c9cf990a0b753a83e89c00cd4175422b77/src/concepts/Continuation.coffee
158
165
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper.init() @initResizeObserver() init: -> @effect...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper...
module.exports = { api: null, colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function(api) { this.api = api; this.initConfigSubscribers(); this.colorHelper.init()...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { api: null, colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function(api) { this.api = api; th...
module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper.init() @initResizeObserver() init: -> @effect...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper.init() @initResizeObserver() init: -> @effect...
@resizeObserver?.disconnect() @canvas?.style.display = "none" @editor = null @editorElement = null animationOff: -> cancelAnimationFrame(@animationFrame) @animationFrame = null animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@updateCanvasDimesions() @calculateOffsets() setupCanvas: (editor, editorElement) -> if not @canvas @canvas = document.createElement "canvas" @context = @canvas.getContext "2d" @canvas.classList.add "power-mode-canvas" @initConfigSubscribers() @scrollView = editorElement.queryS...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@updateCanvasDimesions() @calculateOffsets() setupCanvas: (editor, editorElement) -> if not @canvas @canvas = document.createElement "canvas" @context = @canvas.getContext "2d" @canvas.classList.add "power-mode-canvas" @initConfigSubscribers() @scrollView = editorElement.queryS...
initConfigSubscribers: -> @subscriptions = new CompositeDisposable @observe 'spawnCount.min' @observe 'spawnCount.max' @observe 'totalCount.max' @observe 'size.min' @observe 'size.max' spawn: (cursor, screenPosition, input, size) -> position = @calculatePositions screenPosition colorG...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
random min, max, true calculatePositions: (screenPosition) -> {left, top} = @editorElement.pixelPositionForScreenPosition screenPosition left: left + @offsetLeft - @editorElement.getScrollLeft() top: top + @offsetTop - @editorElement.getScrollTop() + @editor.getLineHeightInPixels() / 2 calculateOffset...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
105
132
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
random min, max, true calculatePositions: (screenPosition) -> {left, top} = @editorElement.pixelPositionForScreenPosition screenPosition left: left + @offsetLeft - @editorElement.getScrollLeft() top: top + @offsetTop - @editorElement.getScrollTop() + @editor.getLineHeightInPixels() / 2 calculateOffset...
@canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @effectRegistry.effect.update() if @phaseStep is 0 @canvas.width = @canvas.width ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/canvas-renderer.coffee
105
132
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init(@api)...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper...
module.exports = { api: null, colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function(api) { this.api = api; this.initConfigSubscribers(); return this.colorHelper...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { api: null, colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function(api) { this.api = api; th...
module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init(@api)...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = api: null colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: (api) -> @api = api @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init(@api)...
@editor = null @editorElement = null animationOff: -> cancelAnimationFrame(@animationFrame) @animationFrame = null animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effectRegistry?.effect.disable() @canvas?.parentNode.removeChild...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@scrollView = editorElement.querySelector(".scroll-view") @scrollView.appendChild @canvas @canvas.style.display = "block" @editorElement = editorElement @editor = editor @updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @ca...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@scrollView = editorElement.querySelector(".scroll-view") @scrollView.appendChild @canvas @canvas.style.display = "block" @editorElement = editorElement @editor = editor @updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @ca...
spawn: (cursor, screenPosition, input, size) -> position = @calculatePositions screenPosition colorGenerator = @colorHelper.generateColors cursor, @editorElement randomSize = => @randomSize(size) colorGenerate = -> colorGenerator.next().value @effectRegistry.effect.spawn position, colorGenerate, in...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
calculateOffsets: -> return if not @scrollView @offsetLeft = 0 @offsetTop = @scrollView.offsetTop updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
105
125
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript calculateOffsets: -> return if not @scrollView @offsetLeft = 0 @offsetTop = @scrollView.offsetTop updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHe...
({ calculateOffsets: function() { if (!this.scrollView) { return; } this.offsetLeft = 0; return this.offsetTop = this.scrollView.offsetTop; }, updateCanvasDimesions: function() { if (!this.editorElement) { return; } this.canvas.width = this.editorElement.offsetWidth; th...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
105
125
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ calculateOffsets: function() { if (!this.scrollView) { return; } this.offsetLeft = 0; return this.offsetTop = this.scrollView.offsetTop; }, updateCanvasDimesions: function() { if (!this.editorElement) { return; } thi...
calculateOffsets: -> return if not @scrollView @offsetLeft = 0 @offsetTop = @scrollView.offsetTop updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
105
125
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
calculateOffsets: -> return if not @scrollView @offsetLeft = 0 @offsetTop = @scrollView.offsetTop updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width
@canvas.style.height = @editorElement.height animate: -> @animationOn() @effectRegistry.effect.update() if @phaseStep is 0 @canvas.width = @canvas.width @effectRegistry.effect.animate(@context) @phaseStep++ @phaseStep = 0 if @phaseStep > 2
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
37f7c51fca75fafb674a322802f69a6f08bfca2f
3,570
https://github.com/JoelBesada/activate-power-mode/blob/37f7c51fca75fafb674a322802f69a6f08bfca2f/lib/canvas-renderer.coffee
105
125
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRe...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { ...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); retu...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
@animationFrame = null animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effectRegistry?.effect.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper?.disable() setupCanvas: (edit...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscri...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscri...
@effectRegistry.effect.spawn position, colorGenerate, input, randomSize, @conf randomSize: (size) -> min = @conf['size.min'] max = @conf['size.max'] if size is 'max' random max - min + 2, max + 2, true else if size is 'min' random min - 1, max - min, true else random min, max, ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @effectRegistry.effect.update() if @phaseStep is 0 ...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
105
119
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @eff...
if (!this.editorElement) { this.canvas.width = this.editorElement.offsetWidth; this.canvas.height = this.editorElement.offsetHeight; this.canvas.style.width = this.editorElement.width; return this.canvas.style.height = this.editorElement.height; } ({ animate: function() { this.animationOn(); this.eff...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
105
119
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (!this.editorElement) { this.canvas.width = this.editorElement.offsetWidth; this.canvas.height = this.editorElement.offsetHeight; this.canvas.style.width = this.editorElement.width; return this.canvas.style.height = this.editorElement.height; } ({ ani...
return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @effectRegistry.effect.update() if @phaseStep is 0 ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
105
119
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: ->
@animationOn() @effectRegistry.effect.update() if @phaseStep is 0 @canvas.width = @canvas.width @effectRegistry.effect.animate(@context) @phaseStep++ @phaseStep = 0 if @phaseStep > 2
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
b931efbccbaf04115b58f63875d658488b9d0b54
3,570
https://github.com/JoelBesada/activate-power-mode/blob/b931efbccbaf04115b58f63875d658488b9d0b54/lib/canvas-renderer.coffee
105
119
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRe...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { ...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); retu...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
@animationFrame = null animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effectRegistry?.effect.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper?.disable() setupCanvas: (edit...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@editor = editor @updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@editor = editor @updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value...
randomSize = => @randomSize(size) colorGenerate = -> colorGenerator.next().value @effectRegistry.effect.spawn position, colorGenerate, input, randomSize, @conf randomSize: (size) -> min = @conf['size.min'] max = @conf['size.max'] if size is 'max' random max - min + 2, max + 2, true el...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @effectRegistry.effect.update()...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
105
120
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: ...
({ updateCanvasDimesions: function() { if (!this.editorElement) { return; } this.canvas.width = this.editorElement.offsetWidth; this.canvas.height = this.editorElement.offsetHeight; this.canvas.style.width = this.editorElement.width; return this.canvas.style.height = this.editorElement.h...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
105
120
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ updateCanvasDimesions: function() { if (!this.editorElement) { return; } this.canvas.width = this.editorElement.offsetWidth; this.canvas.height = this.editorElement.offsetHeight; this.canvas.style.width = this.editorElement.width; ...
updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @effectRegistry.effect.update()...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
105
120
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
updateCanvasDimesions: -> return if not @editorElement @canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: ->
@animationOn() @effectRegistry.effect.update() if @phaseStep is 0 @canvas.width = @canvas.width @effectRegistry.effect.animate(@context) @phaseStep++ @phaseStep = 0 if @phaseStep > 2
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
713155f069c18bc8e753641a697329ae7d079624
3,570
https://github.com/JoelBesada/activate-power-mode/blob/713155f069c18bc8e753641a697329ae7d079624/lib/canvas-renderer.coffee
105
120
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8
3,570
https://github.com/JoelBesada/activate-power-mode/blob/e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRe...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { ...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8
3,570
https://github.com/JoelBesada/activate-power-mode/blob/e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); retu...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8
3,570
https://github.com/JoelBesada/activate-power-mode/blob/e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
@animationFrame = null animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effectRegistry?.effect.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper?.disable() setupCanvas: (edit...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8
3,570
https://github.com/JoelBesada/activate-power-mode/blob/e72a01ec2ce12c0d51efb5963ab1646f8ff1a6b8/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
39a520ab272bc556133710481522b5a054309456
3,570
https://github.com/JoelBesada/activate-power-mode/blob/39a520ab272bc556133710481522b5a054309456/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRe...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { ...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
39a520ab272bc556133710481522b5a054309456
3,570
https://github.com/JoelBesada/activate-power-mode/blob/39a520ab272bc556133710481522b5a054309456/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], phaseStep: 0, setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); retu...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
39a520ab272bc556133710481522b5a054309456
3,570
https://github.com/JoelBesada/activate-power-mode/blob/39a520ab272bc556133710481522b5a054309456/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] phaseStep: 0 setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -...
animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effectRegistry?.effect.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper?.disable() setupCanvas: (editor, editorElement) -> ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
39a520ab272bc556133710481522b5a054309456
3,570
https://github.com/JoelBesada/activate-power-mode/blob/39a520ab272bc556133710481522b5a054309456/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscri...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
39a520ab272bc556133710481522b5a054309456
3,570
https://github.com/JoelBesada/activate-power-mode/blob/39a520ab272bc556133710481522b5a054309456/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@updateCanvasDimesions() @calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscri...
@effectRegistry.effect.spawn position, colorGenerate, input, randomSize, @conf randomSize: (size) -> min = @conf['size.min'] max = @conf['size.max'] if size is 'max' random max - min + 2, max + 2, true else if size is 'min' random min - 1, max - min, true else random min, max, ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
39a520ab272bc556133710481522b5a054309456
3,570
https://github.com/JoelBesada/activate-power-mode/blob/39a520ab272bc556133710481522b5a054309456/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -> @animatio...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.i...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { this.effectRe...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], setEffectRegistry: function(effectRegistry) { return this.effectRegistry = effectRegistry; }, enable: function() { this.initConfigSubscribers(); return this.colorHel...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -> @animatio...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffectRegistry: (effectRegistry) -> @effectRegistry = effectRegistry enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effectRegistry.effect.init() @animationOn() resetCanvas: -> @animatio...
animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effectRegistry?.effect.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper?.disable() setupCanvas: (editor, editorElement) -> ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscriptions =...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscriptions =...
@effectRegistry.effect.spawn position, colorGenerate, input, randomSize, @conf randomSize: (size) -> min = @conf['size.min'] max = @conf['size.max'] if size is 'max' random max - min + 2, max + 2, true else if size is 'min' random min - 1, max - min, true else random min, max, ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
@canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @canvas.width = @canvas.width @effectRegistry.effect.animate(@context)
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
105
114
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
@canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height
animate: -> @animationOn() @canvas.width = @canvas.width @effectRegistry.effect.animate(@context)
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
70cdc43d6acba3bde34121da4c0984bf0bf272fa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/canvas-renderer.coffee
105
114
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> @animationOff() @editor = null @editorElement = ...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> ...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], setEffect: function(effect) { return this.effect = effect; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { this.effect.init(); return this.animation...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], setEffect: function(effect) { return this.effect = effect; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: functio...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> @animationOff() @editor = null @editorElement = ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> @animationOff() @editor = null @editorElement = ...
animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effect?.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper?.disable() setupCanvas: (editor, editorElement) -> if not @canvas ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscriptions =...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@calculateOffsets() window.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscriptions =...
@effect.spawn position, colorGenerate, input, randomSize, @conf randomSize: (size) -> min = @conf['size.min'] max = @conf['size.max'] if size is 'max' random max - min + 2, max + 2, true else if size is 'min' random min - 1, max - min, true else random min, max, true calcula...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
@canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height animate: -> @animationOn() @canvas.width = @canvas.width @effect.animate(@context)
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
105
114
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
@canvas.width = @editorElement.offsetWidth @canvas.height = @editorElement.offsetHeight @canvas.style.width = @editorElement.width @canvas.style.height = @editorElement.height
animate: -> @animationOn() @canvas.width = @canvas.width @effect.animate(@context)
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
102f0c736046b7b806ee5ed78dbdbf47ce148889
3,570
https://github.com/JoelBesada/activate-power-mode/blob/102f0c736046b7b806ee5ed78dbdbf47ce148889/lib/canvas-renderer.coffee
105
114
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@calculateOffsets() @editorElement.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscri...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
aacb5c41dbf02a895abbfd874051d43aa5112ed9
3,570
https://github.com/JoelBesada/activate-power-mode/blob/aacb5c41dbf02a895abbfd874051d43aa5112ed9/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@calculateOffsets() @editorElement.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscri...
@effect.spawn position, colorGenerate, input, randomSize, @conf randomSize: (size) -> min = @conf['size.min'] max = @conf['size.max'] if size is 'max' random max - min + 2, max + 2, true else if size is 'min' random min - 1, max - min, true else random min, max, true calcula...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
aacb5c41dbf02a895abbfd874051d43aa5112ed9
3,570
https://github.com/JoelBesada/activate-power-mode/blob/aacb5c41dbf02a895abbfd874051d43aa5112ed9/lib/canvas-renderer.coffee
55
104
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:raw_corpus
raw_corpus
animate: -> @animationOn() @canvas.width = @canvas.width @effect.animate(@context)
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
aacb5c41dbf02a895abbfd874051d43aa5112ed9
3,570
https://github.com/JoelBesada/activate-power-mode/blob/aacb5c41dbf02a895abbfd874051d43aa5112ed9/lib/canvas-renderer.coffee
105
110
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript animate: -> @animationOn() @canvas.width = @canvas.width @effect.animate(@context) ```
({ animate: function() { this.animationOn(); this.canvas.width = this.canvas.width; return this.effect.animate(this.context); } });
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
aacb5c41dbf02a895abbfd874051d43aa5112ed9
3,570
https://github.com/JoelBesada/activate-power-mode/blob/aacb5c41dbf02a895abbfd874051d43aa5112ed9/lib/canvas-renderer.coffee
105
110
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ animate: function() { this.animationOn(); this.canvas.width = this.canvas.width; return this.effect.animate(this.context); } }); ```
animate: -> @animationOn() @canvas.width = @canvas.width @effect.animate(@context)
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
aacb5c41dbf02a895abbfd874051d43aa5112ed9
3,570
https://github.com/JoelBesada/activate-power-mode/blob/aacb5c41dbf02a895abbfd874051d43aa5112ed9/lib/canvas-renderer.coffee
105
110
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:3:completion
completion
animate: -> @animationOn()
@canvas.width = @canvas.width @effect.animate(@context)
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
aacb5c41dbf02a895abbfd874051d43aa5112ed9
3,570
https://github.com/JoelBesada/activate-power-mode/blob/aacb5c41dbf02a895abbfd874051d43aa5112ed9/lib/canvas-renderer.coffee
105
110
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:raw_corpus
raw_corpus
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> @animationOff() @editor = null @editorElement = ...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
edebf788a5c09ee191305e7c9d3a646807ed4c27
3,570
https://github.com/JoelBesada/activate-power-mode/blob/edebf788a5c09ee191305e7c9d3a646807ed4c27/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> ...
module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], setEffect: function(effect) { return this.effect = effect; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: function() { this.effect.init(); return this.animation...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
edebf788a5c09ee191305e7c9d3a646807ed4c27
3,570
https://github.com/JoelBesada/activate-power-mode/blob/edebf788a5c09ee191305e7c9d3a646807ed4c27/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { colorHelper: colorHelper, subscriptions: null, conf: [], setEffect: function(effect) { return this.effect = effect; }, enable: function() { this.initConfigSubscribers(); return this.colorHelper.init(); }, init: functio...
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> @animationOff() @editor = null @editorElement = ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
edebf788a5c09ee191305e7c9d3a646807ed4c27
3,570
https://github.com/JoelBesada/activate-power-mode/blob/edebf788a5c09ee191305e7c9d3a646807ed4c27/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:1:completion
completion
module.exports = colorHelper: colorHelper subscriptions: null conf: [] setEffect: (effect) -> @effect = effect enable: -> @initConfigSubscribers() @colorHelper.init() init: -> @effect.init() @animationOn() resetCanvas: -> @animationOff() @editor = null @editorElement = ...
animationOn: -> @animationFrame = requestAnimationFrame @animate.bind(this) destroy: -> @resetCanvas() @effect.disable() @canvas?.parentNode.removeChild @canvas @canvas = null @subscriptions?.dispose() @colorHelper.disable() setupCanvas: (editor, editorElement) -> if not @canvas ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
edebf788a5c09ee191305e7c9d3a646807ed4c27
3,570
https://github.com/JoelBesada/activate-power-mode/blob/edebf788a5c09ee191305e7c9d3a646807ed4c27/lib/canvas-renderer.coffee
5
54
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:raw_corpus
raw_corpus
@calculateOffsets() @editorElement.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscri...
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
d0477ba833e8edada7c6f2e7f2ed64fefdf8a025
3,570
https://github.com/JoelBesada/activate-power-mode/blob/d0477ba833e8edada7c6f2e7f2ed64fefdf8a025/lib/canvas-renderer.coffee
54
95
JoelBesada/activate-power-mode:lib/canvas-renderer.coffee:2:completion
completion
@calculateOffsets() @editorElement.addEventListener 'resize', => @updateCanvasDimesions() @calculateOffsets() @init() observe: (key) -> @subscriptions.add atom.config.observe "activate-power-mode.particles.#{key}", (value) => @conf[key] = value initConfigSubscribers: -> @subscri...
colorGenerator = @colorHelper.generateColors cursor, @editorElement @effect.spawn position, colorGenerator, @conf calculatePositions: (screenPosition) -> {left, top} = @editorElement.pixelPositionForScreenPosition screenPosition left: left + @offsetLeft - @editorElement.getScrollLeft() top: top + @of...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/canvas-renderer.coffee
MIT
d0477ba833e8edada7c6f2e7f2ed64fefdf8a025
3,570
https://github.com/JoelBesada/activate-power-mode/blob/d0477ba833e8edada7c6f2e7f2ed64fefdf8a025/lib/canvas-renderer.coffee
54
95
yakyak/yakyak:test/test-conv-init.coffee:1:raw_corpus
raw_corpus
init = require './init.json' conv = require '../src/ui/models/conv' entity = require '../src/ui/models/entity' describe 'conv', -> beforeEach -> conv._reset() entity._reset() describe 'initFromConvStates', -> it 'populates lookup', -> added = conv._initFromConvStates ...
CoffeeScript
yakyak/yakyak
test/test-conv-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-conv-init.coffee
1
26
yakyak/yakyak:test/test-conv-init.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript init = require './init.json' conv = require '../src/ui/models/conv' entity = require '../src/ui/models/entity' describe 'conv', -> beforeEach -> conv._reset() entity._reset() describe 'initFromConvStates', -> it 'populates ...
var conv, entity, init; init = require('./init.json'); conv = require('../src/ui/models/conv'); entity = require('../src/ui/models/entity'); describe('conv', function() { beforeEach(function() { conv._reset(); return entity._reset(); }); return describe('initFromConvStates', function() { it('popul...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-conv-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-conv-init.coffee
1
26
yakyak/yakyak:test/test-conv-init.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var conv, entity, init; init = require('./init.json'); conv = require('../src/ui/models/conv'); entity = require('../src/ui/models/entity'); describe('conv', function() { beforeEach(function() { conv._reset(); return entity._reset(); }); return de...
init = require './init.json' conv = require '../src/ui/models/conv' entity = require '../src/ui/models/entity' describe 'conv', -> beforeEach -> conv._reset() entity._reset() describe 'initFromConvStates', -> it 'populates lookup', -> added = conv._initFromConvStates ...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-conv-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-conv-init.coffee
1
26
yakyak/yakyak:test/test-conv-init.coffee:1:completion
completion
init = require './init.json' conv = require '../src/ui/models/conv' entity = require '../src/ui/models/entity' describe 'conv', -> beforeEach -> conv._reset() entity._reset() describe 'initFromConvStates', -> it 'populates lookup', ->
added = conv._initFromConvStates init.conv_states eql 3, added c = conv['UzNxjbBsPhAAAQ'] assert.isNotNull c eql 'UzNxjbBsPhAAAQ', c.conversation_id.id it 'populates entities with found entities', -> conv._initFromConvStates init.conv_states ...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-conv-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-conv-init.coffee
1
26
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:completion
completion
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# page: Page to render # pageOverrides: Overrides for the current page # pageNumber: Index of the Page in the Dashboard (zero-indexed) # dashboard: Entire Dashboard object # cyclotronDirectives.directive 'dashboardPage', ($compile, $window, $timeout, configService, layoutService, logService) -> { ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:raw_corpus
raw_corpus
link: (scope, element, attrs) -> $element = $(element) $dashboard = $element.parents('.dashboard') $dashboardPageInner = $element.children('.dashboard-page-inner') $dashboardControls = $dashboard.find '.dashboard-controls' $dashboardSidebar = $dashboard.find '...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
44
82
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript link: (scope, element, attrs) -> $element = $(element) $dashboard = $element.parents('.dashboard') $dashboardPageInner = $element.children('.dashboard-page-inner') $dashboardControls = $dashboard.find '.dashboard-co...
({ link: function(scope, element, attrs) { var $dashboard, $dashboardControls, $dashboardPageInner, $dashboardSidebar, $element, masonry, resortWidgets; $element = $(element); $dashboard = $element.parents('.dashboard'); $dashboardPageInner = $element.children('.dashboard-page-inner'); $dashboardC...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
44
82
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ link: function(scope, element, attrs) { var $dashboard, $dashboardControls, $dashboardPageInner, $dashboardSidebar, $element, masonry, resortWidgets; $element = $(element); $dashboard = $element.parents('.dashboard'); $dashboardPageInner = $ele...
link: (scope, element, attrs) -> $element = $(element) $dashboard = $element.parents('.dashboard') $dashboardPageInner = $element.children('.dashboard-page-inner') $dashboardControls = $dashboard.find '.dashboard-controls' $dashboardSidebar = $dashboard.find '...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
44
82
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:completion
completion
link: (scope, element, attrs) -> $element = $(element) $dashboard = $element.parents('.dashboard') $dashboardPageInner = $element.children('.dashboard-page-inner') $dashboardControls = $dashboard.find '.dashboard-controls' $dashboardSidebar = $dashboard.find '...
# Normally, Widgets appear in sequential order that they are listed in the Dashboard # However, Users can override the Widget index, so this must be taken into account resortWidgets = -> # Apply User overrides to Widget sort order if scope.pageOverrides?.widgets? ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
44
82
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:raw_corpus
raw_corpus
updatePage = -> # Assign uids to Widgets -- use for tracking if widgets are rearranged _.each scope.page.widgets, (widget) -> widget.uid ?= uuid.v4() return # Sort Widgets per overrides resortWidgets() ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
84
123
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript updatePage = -> # Assign uids to Widgets -- use for tracking if widgets are rearranged _.each scope.page.widgets, (widget) -> widget.uid ?= uuid.v4() return # Sort Widgets p...
var updatePage; updatePage = function() { var updateLayout; // Assign uids to Widgets -- use for tracking if widgets are rearranged _.each(scope.page.widgets, function(widget) { if (widget.uid == null) { widget.uid = uuid.v4(); } }); // Sort Widgets per overrides resortWidgets(); // Update ...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
84
123
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var updatePage; updatePage = function() { var updateLayout; // Assign uids to Widgets -- use for tracking if widgets are rearranged _.each(scope.page.widgets, function(widget) { if (widget.uid == null) { widget.uid = uuid.v4(); } }); // Sor...
updatePage = -> # Assign uids to Widgets -- use for tracking if widgets are rearranged _.each scope.page.widgets, (widget) -> widget.uid ?= uuid.v4() return # Sort Widgets per overrides resortWidgets() ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
84
123
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:completion
completion
updatePage = -> # Assign uids to Widgets -- use for tracking if widgets are rearranged _.each scope.page.widgets, (widget) -> widget.uid ?= uuid.v4() return # Sort Widgets per overrides resortWidgets() ...
containerWidth = $dashboard.innerWidth() containerHeight = $($window).height() # Recalculate layout scope.layout = layoutService.getLayout scope.page, containerWidth, containerHeight # Set page margin if defined if !_....
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
84
123
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:raw_corpus
raw_corpus
# Update everything updateLayout() resizeFunction = _.throttle(-> scope.$apply updateLayout , 65) # Update on element resizing $element.on 'resize', resizeFunction scope.$on '$destroy', -> ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
126
167
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:completion
completion
# Update everything updateLayout() resizeFunction = _.throttle(-> scope.$apply updateLayout , 65) # Update on element resizing $element.on 'resize', resizeFunction scope.$on '$destroy', -> ...
$('html').css('background-color', color) return # # Watch the dashboard page and update the layout # scope.$watch 'page', (page, oldValue) -> return if _.isUndefined(page) updatePage() scope.$watch 'pageOverri...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
126
167
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:5:raw_corpus
raw_corpus
# # Cleanup # scope.$on '$destroy', -> # Uninitialize Masonry if still present if $dashboardPageInner.data('masonry') $dashboardPageInner.masonry('destroy') return }
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
169
179
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:5:completion
completion
# # Cleanup # scope.$on '$destroy', -> # Uninitialize Masonry if still present
if $dashboardPageInner.data('masonry') $dashboardPageInner.masonry('destroy') return }
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
MIT
31207fc23b89c9a0e232c38d9cf4c24f9e247f4b
1,544
https://github.com/ExpediaGroup/cyclotron/blob/31207fc23b89c9a0e232c38d9cf4c24f9e247f4b/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee
169
179