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
lucasmotta/dploy:src/dploy.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if @servers.length @connection = new Deploy @config, @servers[0], @ignoreInclude @connection.completed.add @deploy @servers.shift() # Finish the process else console.log "All Completed :)".green.bold @completed.call(@) if @completed process....
var code; if (this.servers.length) { this.connection = new Deploy(this.config, this.servers[0], this.ignoreInclude); this.connection.completed.add(this.deploy); this.servers.shift(); } else { // Finish the process console.log("All Completed :)".green.bold); if (this.completed) { this.completed.call(thi...
CoffeeScript
JavaScript
lucasmotta/dploy
src/dploy.coffee
MIT
217e4d090fd46e09d8d9b3ce016ffdedfd77cda7
973
https://github.com/lucasmotta/dploy/blob/217e4d090fd46e09d8d9b3ce016ffdedfd77cda7/src/dploy.coffee
51
61
lucasmotta/dploy:src/dploy.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var code; if (this.servers.length) { this.connection = new Deploy(this.config, this.servers[0], this.ignoreInclude); this.connection.completed.add(this.deploy); this.servers.shift(); } else { // Finish the process console.log("All Completed :)".green.bol...
if @servers.length @connection = new Deploy @config, @servers[0], @ignoreInclude @connection.completed.add @deploy @servers.shift() # Finish the process else console.log "All Completed :)".green.bold @completed.call(@) if @completed process.exit(code=0) return @
JavaScript
CoffeeScript
lucasmotta/dploy
src/dploy.coffee
MIT
217e4d090fd46e09d8d9b3ce016ffdedfd77cda7
973
https://github.com/lucasmotta/dploy/blob/217e4d090fd46e09d8d9b3ce016ffdedfd77cda7/src/dploy.coffee
51
61
lucasmotta/dploy:src/dploy.coffee:2:completion
completion
if @servers.length @connection = new Deploy @config, @servers[0], @ignoreInclude @connection.completed.add @deploy @servers.shift() # Finish the process
else console.log "All Completed :)".green.bold @completed.call(@) if @completed process.exit(code=0) return @
CoffeeScript
CoffeeScript
lucasmotta/dploy
src/dploy.coffee
MIT
217e4d090fd46e09d8d9b3ce016ffdedfd77cda7
973
https://github.com/lucasmotta/dploy/blob/217e4d090fd46e09d8d9b3ce016ffdedfd77cda7/src/dploy.coffee
51
61
lucasmotta/dploy:src/dploy.coffee:1:raw_corpus
raw_corpus
colors = require "colors" Deploy = require "./deploy" Generator = require "./generator" Help = require "./help" module.exports = class DPLOY servers : null connection : null ignoreInclude : false constructor: -> # Call the DPLOY generator if process.argv.indexOf("install") >= 0 new Generator() # Ope...
CoffeeScript
lucasmotta/dploy
src/dploy.coffee
MIT
ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca
973
https://github.com/lucasmotta/dploy/blob/ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca/src/dploy.coffee
1
46
lucasmotta/dploy:src/dploy.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript colors = require "colors" Deploy = require "./deploy" Generator = require "./generator" Help = require "./help" module.exports = class DPLOY servers : null connection : null ignoreInclude : false constructor: -> # Call the DPLOY generator if proces...
var DPLOY, Deploy, Generator, Help, colors; colors = require("colors"); Deploy = require("./deploy"); Generator = require("./generator"); Help = require("./help"); module.exports = DPLOY = (function() { class DPLOY { constructor() { this.deploy = this.deploy.bind(this); // Call the DPLOY generato...
CoffeeScript
JavaScript
lucasmotta/dploy
src/dploy.coffee
MIT
ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca
973
https://github.com/lucasmotta/dploy/blob/ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca/src/dploy.coffee
1
46
lucasmotta/dploy:src/dploy.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var DPLOY, Deploy, Generator, Help, colors; colors = require("colors"); Deploy = require("./deploy"); Generator = require("./generator"); Help = require("./help"); module.exports = DPLOY = (function() { class DPLOY { constructor() { this.deploy = t...
colors = require "colors" Deploy = require "./deploy" Generator = require "./generator" Help = require "./help" module.exports = class DPLOY servers : null connection : null ignoreInclude : false constructor: -> # Call the DPLOY generator if process.argv.indexOf("install") >= 0 new Generator() # Ope...
JavaScript
CoffeeScript
lucasmotta/dploy
src/dploy.coffee
MIT
ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca
973
https://github.com/lucasmotta/dploy/blob/ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca/src/dploy.coffee
1
46
lucasmotta/dploy:src/dploy.coffee:1:completion
completion
colors = require "colors" Deploy = require "./deploy" Generator = require "./generator" Help = require "./help" module.exports = class DPLOY servers : null connection : null ignoreInclude : false constructor: -> # Call the DPLOY generator if process.argv.indexOf("install") >= 0 new Generator() # Ope...
@ignoreInclude = @servers.indexOf("-i") >= 0 or @servers.indexOf("--ignore-include") >= 0 # Remove the ignore flag from the server list @servers = @servers.filter (value) -> value isnt "-i" and value isnt "--ignore-include" # If you don't set any servers, add an empty one to upload the first environment only ...
CoffeeScript
CoffeeScript
lucasmotta/dploy
src/dploy.coffee
MIT
ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca
973
https://github.com/lucasmotta/dploy/blob/ceede908f5bbeaf53fb729ee2e3d1ae32d9c46ca/src/dploy.coffee
1
46
jianliaoim/talk-os:talk-account/client/app/account-switcher.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' classnames = require 'classnames' locales = require '../locales' Space = React.createFactory require 'react-lite-space' {div, span, a} = React.DOM module.exports = React.createClass displayName: 'account-switcher' propTypes: tab: React.PropTypes.strin...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/account-switcher.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/account-switcher.coffee
1
37
jianliaoim/talk-os:talk-account/client/app/account-switcher.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' classnames = require 'classnames' locales = require '../locales' Space = React.createFactory require 'react-lite-space' {div, span, a} = React.DOM module.exports = React.createClass displayName: 'accou...
var Immutable, React, Space, a, classnames, div, locales, span; React = require('react'); Immutable = require('immutable'); classnames = require('classnames'); locales = require('../locales'); Space = React.createFactory(require('react-lite-space')); ({div, span, a} = React.DOM); module.exports = React.createCla...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/client/app/account-switcher.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/account-switcher.coffee
1
37
jianliaoim/talk-os:talk-account/client/app/account-switcher.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, React, Space, a, classnames, div, locales, span; React = require('react'); Immutable = require('immutable'); classnames = require('classnames'); locales = require('../locales'); Space = React.createFactory(require('react-lite-space')); ({div, s...
React = require 'react' Immutable = require 'immutable' classnames = require 'classnames' locales = require '../locales' Space = React.createFactory require 'react-lite-space' {div, span, a} = React.DOM module.exports = React.createClass displayName: 'account-switcher' propTypes: tab: React.PropTypes.strin...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/account-switcher.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/account-switcher.coffee
1
37
jianliaoim/talk-os:talk-account/client/app/account-switcher.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' classnames = require 'classnames' locales = require '../locales' Space = React.createFactory require 'react-lite-space' {div, span, a} = React.DOM module.exports = React.createClass displayName: 'account-switcher' propTypes: tab: React.PropTypes.strin...
onSwitchEmail: -> if @props.tab isnt 'email' @props.onSwitch 'email' onSwitchMobile: -> if @props.tab isnt 'mobile' @props.onSwitch 'mobile' render: -> emailClass = classnames 'account-tab', 'is-selected': @props.tab is 'email' mobileClass = classnames 'account-tab', 'is-se...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/account-switcher.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/account-switcher.coffee
1
37
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:1:raw_corpus
raw_corpus
cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' PureRenderMixin = require 'react-addons-pure-render-mixin' { span } = React.DOM T = React....
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' PureRenderMixin = require 'react-...
var Immutable, PureRenderMixin, React, T, cx, lang, mixinSubscribe, query, recorder, span; cx = require('classnames'); React = require('react'); recorder = require('actions-recorder'); Immutable = require('immutable'); query = require('../query'); lang = require('../locales/lang'); mixinSubscribe = require('../m...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, PureRenderMixin, React, T, cx, lang, mixinSubscribe, query, recorder, span; cx = require('classnames'); React = require('react'); recorder = require('actions-recorder'); Immutable = require('immutable'); query = require('../query'); lang = requ...
cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' PureRenderMixin = require 'react-addons-pure-render-mixin' { span } = React.DOM T = React....
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:1:completion
completion
cx = require 'classnames' React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' PureRenderMixin = require 'react-addons-pure-render-mixin' { span } = React.DOM T = React....
className: T.string component: T.any getDefaultProps: -> component: 'span' getInitialState: -> prefs: @getPrefs() componentDidMount: -> @subscribe recorder, => @setState prefs: @getPrefs() getPrefs: -> store = recorder.getState() _teamId = @props._teamId _userId = @...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:2:raw_corpus
raw_corpus
if alias?.trim() name = alias if isRobot and service is 'talkai' name = lang.getText 'ai-robot' React.createElement @props.component, className: cx(@props.className) name
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
51
59
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if alias?.trim() name = alias if isRobot and service is 'talkai' name = lang.getText 'ai-robot' React.createElement @props.component, className: cx(@props.className) name ```
var name; if (typeof alias !== "undefined" && alias !== null ? alias.trim() : void 0) { name = alias; } if (isRobot && service === 'talkai') { name = lang.getText('ai-robot'); } React.createElement(this.props.component, { className: cx(this.props.className) }, name);
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
51
59
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var name; if (typeof alias !== "undefined" && alias !== null ? alias.trim() : void 0) { name = alias; } if (isRobot && service === 'talkai') { name = lang.getText('ai-robot'); } React.createElement(this.props.component, { className: cx(this.props.className...
if alias?.trim() name = alias if isRobot and service is 'talkai' name = lang.getText 'ai-robot' React.createElement @props.component, className: cx(@props.className) name
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
51
59
jianliaoim/talk-os:talk-web/client/module/user-name.coffee:2:completion
completion
if alias?.trim() name = alias if isRobot and service is 'talkai' name = lang.getText 'ai-robot'
React.createElement @props.component, className: cx(@props.className) name
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/user-name.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/user-name.coffee
51
59
cdglabs/apparatus:src/View/AttributeRow.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render: -> attribute = @props.attribute R.div {classNa...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render...
var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project, hoverManager: R.HoverManager }, render: functi...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project,...
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render: -> attribute = @props.attribute R.div {classNa...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:completion
completion
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render: -> attribute = @props.attribute R.div {classNa...
isGoingToChange: @_isGoingToChange() }}, R.div {className: "AttributeRowControl"}, R.div { className: R.cx { AttributeControl: true Interactive: true isControllable: @_isControllable() isControlled: @_isControlled() isImplicitlyCont...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:2:raw_corpus
raw_corpus
_isGoingToChange: -> {attribute} = @props {hoverManager} = @context return _.contains(hoverManager.attributesToChange, attribute) _selectedElement: -> {project} = @context return selectedElement = project.selectedParticularElement?.element _isControlled: -> return _.contains(@context.proje...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
44
83
cdglabs/apparatus:src/View/AttributeRow.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _isGoingToChange: -> {attribute} = @props {hoverManager} = @context return _.contains(hoverManager.attributesToChange, attribute) _selectedElement: -> {project} = @context return selectedElement = project.selectedParticularElement?.element ...
({ _isGoingToChange: function() { var attribute, hoverManager; ({attribute} = this.props); ({hoverManager} = this.context); return _.contains(hoverManager.attributesToChange, attribute); }, _selectedElement: function() { var project, ref, selectedElement; ({project} = this.context); re...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
44
83
cdglabs/apparatus:src/View/AttributeRow.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _isGoingToChange: function() { var attribute, hoverManager; ({attribute} = this.props); ({hoverManager} = this.context); return _.contains(hoverManager.attributesToChange, attribute); }, _selectedElement: function() { var project, ref, ...
_isGoingToChange: -> {attribute} = @props {hoverManager} = @context return _.contains(hoverManager.attributesToChange, attribute) _selectedElement: -> {project} = @context return selectedElement = project.selectedParticularElement?.element _isControlled: -> return _.contains(@context.proje...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
44
83
cdglabs/apparatus:src/View/AttributeRow.coffee:2:completion
completion
_isGoingToChange: -> {attribute} = @props {hoverManager} = @context return _.contains(hoverManager.attributesToChange, attribute) _selectedElement: -> {project} = @context return selectedElement = project.selectedParticularElement?.element _isControlled: -> return _.contains(@context.proje...
{project} = @context selectedElement = project.selectedParticularElement?.element return unless selectedElement if @_isControlled() selectedElement.removeControlledAttribute(attribute) else selectedElement.addControlledAttribute(attribute) R.create "AttributeLabel", propTypes: attrib...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
44
83
cdglabs/apparatus:src/View/AttributeRow.coffee:3:raw_corpus
raw_corpus
R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hoveredAttribute == attribute # Variable: @node.parent().isVariantOf(Element) } onMouseDown: @_onMouseDown onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave ...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
85
129
cdglabs/apparatus:src/View/AttributeRow.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hoveredAttribute == attribute # Variable: @node.parent().isVariantOf(Element) } onMouseDown: @_onMouseDown onMouseEnte...
R.div({ className: R.cx({ AttributeLabel: true, Interactive: true, isHovered: hoverManager.hoveredAttribute === attribute }), // Variable: @node.parent().isVariantOf(Element) onMouseDown: this._onMouseDown, onMouseEnter: this._onMouseEnter, onMouseLeave: this._onMouseLeave }, R.EditableText({ ...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
85
129
cdglabs/apparatus:src/View/AttributeRow.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript R.div({ className: R.cx({ AttributeLabel: true, Interactive: true, isHovered: hoverManager.hoveredAttribute === attribute }), // Variable: @node.parent().isVariantOf(Element) onMouseDown: this._onMouseDown, onMouseEnter: this._onMouseEnter, ...
R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hoveredAttribute == attribute # Variable: @node.parent().isVariantOf(Element) } onMouseDown: @_onMouseDown onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave ...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
85
129
cdglabs/apparatus:src/View/AttributeRow.coffee:3:completion
completion
R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hoveredAttribute == attribute # Variable: @node.parent().isVariantOf(Element) } onMouseDown: @_onMouseDown onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave ...
{dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: mouseDownEvent.clientX y: mouseDownEvent.clientY onMove: (mouseMoveEvent) -> dragManager.drag.x = mouseMoveEvent.clie...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
85
129
cdglabs/apparatus:src/View/AttributeRow.coffee:4:raw_corpus
raw_corpus
_onMouseEnter: (e) -> {attribute} = @props {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = attribute _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null R.create ...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
131
170
cdglabs/apparatus:src/View/AttributeRow.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _onMouseEnter: (e) -> {attribute} = @props {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = attribute _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.d...
({ _onMouseEnter: function(e) { var attribute, dragManager, hoverManager; ({attribute} = this.props); ({dragManager, hoverManager} = this.context); if (dragManager.drag != null) { return; } return hoverManager.hoveredAttribute = attribute; }, _onMouseLeave: function(e) { var drag...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
131
170
cdglabs/apparatus:src/View/AttributeRow.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _onMouseEnter: function(e) { var attribute, dragManager, hoverManager; ({attribute} = this.props); ({dragManager, hoverManager} = this.context); if (dragManager.drag != null) { return; } return hoverManager.hoveredAttribute = attr...
_onMouseEnter: (e) -> {attribute} = @props {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = attribute _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null R.create ...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
131
170
cdglabs/apparatus:src/View/AttributeRow.coffee:4:completion
completion
_onMouseEnter: (e) -> {attribute} = @props {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = attribute _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null R.create ...
render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave }, attribute.label # # TODO: This ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
131
170
cdglabs/apparatus:src/View/AttributeRow.coffee:5:raw_corpus
raw_corpus
# _label: -> # if @contextAttribute # contextElement = @_parentElement(@contextAttribute) # element = @_parentElement(@attribute) # isSameContext = element.isAncestorOf(contextElement) # if !isSameContext # return @attribute.parent().label + "’s " + @attribute.label # return @att...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
172
190
cdglabs/apparatus:src/View/AttributeRow.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # _label: -> # if @contextAttribute # contextElement = @_parentElement(@contextAttribute) # element = @_parentElement(@attribute) # isSameContext = element.isAncestorOf(contextElement) # if !isSameContext # return @attribute.pa...
// _label: -> // if @contextAttribute // contextElement = @_parentElement(@contextAttribute) // element = @_parentElement(@attribute) // isSameContext = element.isAncestorOf(contextElement) // if !isSameContext // return @attribute.parent().label + "’s " + @attribute.label // return @attribute...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
172
190
cdglabs/apparatus:src/View/AttributeRow.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // _label: -> // if @contextAttribute // contextElement = @_parentElement(@contextAttribute) // element = @_parentElement(@attribute) // isSameContext = element.isAncestorOf(contextElement) // if !isSameContext // return @attribute.parent()....
# _label: -> # if @contextAttribute # contextElement = @_parentElement(@contextAttribute) # element = @_parentElement(@attribute) # isSameContext = element.isAncestorOf(contextElement) # if !isSameContext # return @attribute.parent().label + "’s " + @attribute.label # return @att...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
172
190
cdglabs/apparatus:src/View/AttributeRow.coffee:5:completion
completion
# _label: -> # if @contextAttribute # contextElement = @_parentElement(@contextAttribute) # element = @_parentElement(@attribute) # isSameContext = element.isAncestorOf(contextElement) # if !isSameContext # return @attribute.parent().label + "’s " + @attribute.label # return @att...
_onMouseEnter: (e) -> {attribute} = @props {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = attribute _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2d5f949a78c421af9994b726a247aff690bfd525
1,052
https://github.com/cdglabs/apparatus/blob/2d5f949a78c421af9994b726a247aff690bfd525/src/View/AttributeRow.coffee
172
190
cdglabs/apparatus:src/View/AttributeRow.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render: -> attribute = @props.attribute R.div {classNa...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2b363abb10e11928c370d1ab711547e842df8d4e
1,052
https://github.com/cdglabs/apparatus/blob/2b363abb10e11928c370d1ab711547e842df8d4e/src/View/AttributeRow.coffee
1
41
cdglabs/apparatus:src/View/AttributeRow.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render...
var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project, hoverManager: R.HoverManager }, render: functi...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2b363abb10e11928c370d1ab711547e842df8d4e
1,052
https://github.com/cdglabs/apparatus/blob/2b363abb10e11928c370d1ab711547e842df8d4e/src/View/AttributeRow.coffee
1
41
cdglabs/apparatus:src/View/AttributeRow.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project,...
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render: -> attribute = @props.attribute R.div {classNa...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2b363abb10e11928c370d1ab711547e842df8d4e
1,052
https://github.com/cdglabs/apparatus/blob/2b363abb10e11928c370d1ab711547e842df8d4e/src/View/AttributeRow.coffee
1
41
cdglabs/apparatus:src/View/AttributeRow.coffee:1:completion
completion
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project hoverManager: R.HoverManager render: -> attribute = @props.attribute R.div {classNa...
isGoingToChange: @_isGoingToChange() }}, R.div {className: "AttributeRowControl"}, R.div { className: R.cx { AttributeControl: true Interactive: true isControllable: @_isControllable() isControlled: @_isControlled() isImplicitlyCont...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
2b363abb10e11928c370d1ab711547e842df8d4e
1,052
https://github.com/cdglabs/apparatus/blob/2b363abb10e11928c370d1ab711547e842df8d4e/src/View/AttributeRow.coffee
1
41
cdglabs/apparatus:src/View/AttributeRow.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attri...
var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project }, render: function() { var attribute; attr...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project ...
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:1:completion
completion
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
}}, R.div {className: "AttributeRowControl"}, R.div { className: R.cx { AttributeControl: true Interactive: true isControllable: @_isControllable() isControlled: @_isControlled() isImplicitlyControlled: @_isImplicityControlled() ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:2:raw_corpus
raw_corpus
_selectedElement: -> {project} = @context return selectedElement = project.selectedParticularElement?.element _isControlled: -> return _.contains(@context.project.controlledAttributes(), @props.attribute) _isImplicityControlled: -> return _.contains(@context.project.implicitlyControlledAttributes(...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
41
90
cdglabs/apparatus:src/View/AttributeRow.coffee:2:completion
completion
_selectedElement: -> {project} = @context return selectedElement = project.selectedParticularElement?.element _isControlled: -> return _.contains(@context.project.controlledAttributes(), @props.attribute) _isImplicityControlled: -> return _.contains(@context.project.implicitlyControlledAttributes(...
propTypes: attribute: Model.Attribute contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hove...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
41
90
cdglabs/apparatus:src/View/AttributeRow.coffee:3:raw_corpus
raw_corpus
setValue: (newValue) -> attribute.label = newValue }
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
91
93
cdglabs/apparatus:src/View/AttributeRow.coffee:4:raw_corpus
raw_corpus
_onMouseDown: (mouseDownEvent) -> return if Util.closest(mouseDownEvent.target, ".EditableTextInline") {attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: ...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
95
132
cdglabs/apparatus:src/View/AttributeRow.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _onMouseDown: (mouseDownEvent) -> return if Util.closest(mouseDownEvent.target, ".EditableTextInline") {attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "...
({ _onMouseDown: function(mouseDownEvent) { var attribute, dragManager, hoverManager; if (Util.closest(mouseDownEvent.target, ".EditableTextInline")) { return; } ({attribute} = this.props); ({dragManager, hoverManager} = this.context); mouseDownEvent.preventDefault(); return dragMana...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
95
132
cdglabs/apparatus:src/View/AttributeRow.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _onMouseDown: function(mouseDownEvent) { var attribute, dragManager, hoverManager; if (Util.closest(mouseDownEvent.target, ".EditableTextInline")) { return; } ({attribute} = this.props); ({dragManager, hoverManager} = this.context); ...
_onMouseDown: (mouseDownEvent) -> return if Util.closest(mouseDownEvent.target, ".EditableTextInline") {attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: ...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
95
132
cdglabs/apparatus:src/View/AttributeRow.coffee:4:completion
completion
_onMouseDown: (mouseDownEvent) -> return if Util.closest(mouseDownEvent.target, ".EditableTextInline") {attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: ...
_transcludeIntoFocusedExpression: -> {attribute} = @props focusedCodeMirrorEl = document.querySelector(".CodeMirror-focused") return unless focusedCodeMirrorEl expressionCodeEl = Util.closest(focusedCodeMirrorEl, ".ExpressionCode") expressionCode = expressionCodeEl.component expressionCode.trans...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
95
132
cdglabs/apparatus:src/View/AttributeRow.coffee:5:raw_corpus
raw_corpus
R.create "AttributeToken", propTypes: attribute: Model.Attribute # contextAttribute: {optional: Model.Attribute} contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { R...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
135
177
cdglabs/apparatus:src/View/AttributeRow.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R.create "AttributeToken", propTypes: attribute: Model.Attribute # contextAttribute: {optional: Model.Attribute} contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} =...
R.create("AttributeToken", { propTypes: { attribute: Model.Attribute }, // contextAttribute: {optional: Model.Attribute} contextTypes: { dragManager: R.DragManager, hoverManager: R.HoverManager }, render: function() { var attribute, hoverManager; ({attribute} = this.props); ({hoverMa...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
135
177
cdglabs/apparatus:src/View/AttributeRow.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript R.create("AttributeToken", { propTypes: { attribute: Model.Attribute }, // contextAttribute: {optional: Model.Attribute} contextTypes: { dragManager: R.DragManager, hoverManager: R.HoverManager }, render: function() { var attribute, hove...
R.create "AttributeToken", propTypes: attribute: Model.Attribute # contextAttribute: {optional: Model.Attribute} contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { R...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
135
177
cdglabs/apparatus:src/View/AttributeRow.coffee:5:completion
completion
R.create "AttributeToken", propTypes: attribute: Model.Attribute # contextAttribute: {optional: Model.Attribute} contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { R...
attribute.label # # TODO: This helper should be moved somewhere else (Node?) # _parentElement: (node) -> # return null if !node? # return node if node.isVariantOf(Model.Element) # return @_parentElement(node.parent()) # _label: -> # if @contextAttribute # contextElement = @_parentElement(@...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
135
177
cdglabs/apparatus:src/View/AttributeRow.coffee:6:raw_corpus
raw_corpus
_onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
179
182
cdglabs/apparatus:src/View/AttributeRow.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null ```
({ _onMouseLeave: function(e) { var dragManager, hoverManager; ({dragManager, hoverManager} = this.context); if (dragManager.drag != null) { return; } return hoverManager.hoveredAttribute = null; } });
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
179
182
cdglabs/apparatus:src/View/AttributeRow.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _onMouseLeave: function(e) { var dragManager, hoverManager; ({dragManager, hoverManager} = this.context); if (dragManager.drag != null) { return; } return hoverManager.hoveredAttribute = null; } }); ```
_onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
179
182
cdglabs/apparatus:src/View/AttributeRow.coffee:6:completion
completion
_onMouseLeave: (e) -> {dragManager, hoverManager} = @context
return if dragManager.drag? hoverManager.hoveredAttribute = null
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
896fc4d728fc1015523192d00ca84867261c648b
1,052
https://github.com/cdglabs/apparatus/blob/896fc4d728fc1015523192d00ca84867261c648b/src/View/AttributeRow.coffee
179
182
cdglabs/apparatus:src/View/AttributeRow.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attri...
var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project }, render: function() { var attribute; attr...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project ...
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:1:completion
completion
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
}}, R.div {className: "AttributeRowControl"}, R.div { className: R.cx { AttributeControl: true Interactive: true # Controllable: @_isControllable() isControlled: @_isControlled() # ImplicitlyControlled: @_isImplicityControlled() ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
1
39
cdglabs/apparatus:src/View/AttributeRow.coffee:2:raw_corpus
raw_corpus
_isControlled: -> {attribute} = @props {project} = @context selectedElement = project.selectedParticularElement?.element return false unless selectedElement controlledAttributes = selectedElement.controlledAttributes() return _.contains(controlledAttributes, attribute) # _isImplicityControlle...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
41
90
cdglabs/apparatus:src/View/AttributeRow.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _isControlled: -> {attribute} = @props {project} = @context selectedElement = project.selectedParticularElement?.element return false unless selectedElement controlledAttributes = selectedElement.controlledAttributes() return _.contains(co...
({ _isControlled: function() { var attribute, controlledAttributes, project, ref, selectedElement; ({attribute} = this.props); ({project} = this.context); selectedElement = (ref = project.selectedParticularElement) != null ? ref.element : void 0; if (!selectedElement) { return false; } ...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
41
90
cdglabs/apparatus:src/View/AttributeRow.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _isControlled: function() { var attribute, controlledAttributes, project, ref, selectedElement; ({attribute} = this.props); ({project} = this.context); selectedElement = (ref = project.selectedParticularElement) != null ? ref.element : void 0; ...
_isControlled: -> {attribute} = @props {project} = @context selectedElement = project.selectedParticularElement?.element return false unless selectedElement controlledAttributes = selectedElement.controlledAttributes() return _.contains(controlledAttributes, attribute) # _isImplicityControlle...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
41
90
cdglabs/apparatus:src/View/AttributeRow.coffee:2:completion
completion
_isControlled: -> {attribute} = @props {project} = @context selectedElement = project.selectedParticularElement?.element return false unless selectedElement controlledAttributes = selectedElement.controlledAttributes() return _.contains(controlledAttributes, attribute) # _isImplicityControlle...
R.create "AttributeLabel", propTypes: attribute: Model.Attribute contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.div { className: R.cx { AttributeLabel: true Interactive: true ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
41
90
cdglabs/apparatus:src/View/AttributeRow.coffee:3:raw_corpus
raw_corpus
R.EditableText { className: "EditableTextInline Interactive" value: attribute.label setValue: (newValue) -> attribute.label = newValue }
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
91
96
cdglabs/apparatus:src/View/AttributeRow.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R.EditableText { className: "EditableTextInline Interactive" value: attribute.label setValue: (newValue) -> attribute.label = newValue } ```
R.EditableText({ className: "EditableTextInline Interactive", value: attribute.label, setValue: function(newValue) { return attribute.label = newValue; } });
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
91
96
cdglabs/apparatus:src/View/AttributeRow.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript R.EditableText({ className: "EditableTextInline Interactive", value: attribute.label, setValue: function(newValue) { return attribute.label = newValue; } }); ```
R.EditableText { className: "EditableTextInline Interactive" value: attribute.label setValue: (newValue) -> attribute.label = newValue }
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
91
96
cdglabs/apparatus:src/View/AttributeRow.coffee:3:completion
completion
R.EditableText { className: "EditableTextInline Interactive" value: attribute.label
setValue: (newValue) -> attribute.label = newValue }
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f9381029aed76999f35bd230c6d7cc6fb98c4077
1,052
https://github.com/cdglabs/apparatus/blob/f9381029aed76999f35bd230c6d7cc6fb98c4077/src/View/AttributeRow.coffee
91
96
cdglabs/apparatus:src/View/AttributeRow.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f53fd4ff0c47dea65be0193268bbe3980fef69e4
1,052
https://github.com/cdglabs/apparatus/blob/f53fd4ff0c47dea65be0193268bbe3980fef69e4/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attri...
var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project }, render: function() { var attribute; attr...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f53fd4ff0c47dea65be0193268bbe3980fef69e4
1,052
https://github.com/cdglabs/apparatus/blob/f53fd4ff0c47dea65be0193268bbe3980fef69e4/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Model, R, Util, _; _ = require("underscore"); R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, contextTypes: { project: Model.Project ...
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f53fd4ff0c47dea65be0193268bbe3980fef69e4
1,052
https://github.com/cdglabs/apparatus/blob/f53fd4ff0c47dea65be0193268bbe3980fef69e4/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:completion
completion
_ = require "underscore" R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute contextTypes: project: Model.Project render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: tr...
className: R.cx { AttributeControl: true Interactive: true # Controllable: @_isControllable() isControlled: @_isControlled() # ImplicitlyControlled: @_isImplicityControlled() } onClick: @_toggleControl } R.div {className: "Att...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f53fd4ff0c47dea65be0193268bbe3980fef69e4
1,052
https://github.com/cdglabs/apparatus/blob/f53fd4ff0c47dea65be0193268bbe3980fef69e4/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:2:raw_corpus
raw_corpus
# _isImplicityControlled: -> # implicitlyControlledAttributes = State.Editor.getSelectedElement().getImplicitlyControlledAttributes() # return _.contains(implicitlyControlledAttributes, @attribute) # _isControllable: -> # controllableAttributes = State.Editor.getSelectedElement().getControllableAttribute...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f53fd4ff0c47dea65be0193268bbe3980fef69e4
1,052
https://github.com/cdglabs/apparatus/blob/f53fd4ff0c47dea65be0193268bbe3980fef69e4/src/View/AttributeRow.coffee
44
91
cdglabs/apparatus:src/View/AttributeRow.coffee:2:completion
completion
# _isImplicityControlled: -> # implicitlyControlledAttributes = State.Editor.getSelectedElement().getImplicitlyControlledAttributes() # return _.contains(implicitlyControlledAttributes, @attribute) # _isControllable: -> # controllableAttributes = State.Editor.getSelectedElement().getControllableAttribute...
dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hoveredAttribute == attribute # Variable: @node.parent().is...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
f53fd4ff0c47dea65be0193268bbe3980fef69e4
1,052
https://github.com/cdglabs/apparatus/blob/f53fd4ff0c47dea65be0193268bbe3980fef69e4/src/View/AttributeRow.coffee
44
91
cdglabs/apparatus:src/View/AttributeRow.coffee:1:raw_corpus
raw_corpus
R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: true }}, R.div {className: "AttributeRowControl"}, R....
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: true }}, ...
var Model, R, Util; R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, render: function() { var attribute; attribute = this.props.attribute; return R.div({ className: R.cx({ ...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Model, R, Util; R = require("./R"); Model = require("../Model/Model"); Util = require("../Util/Util"); R.create("AttributeRow", { propTypes: { attribute: Model.Attribute }, render: function() { var attribute; attribute = this.props.attribu...
R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: true }}, R.div {className: "AttributeRowControl"}, R....
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:1:completion
completion
R = require "./R" Model = require "../Model/Model" Util = require "../Util/Util" R.create "AttributeRow", propTypes: attribute: Model.Attribute render: -> attribute = @props.attribute R.div {className: R.cx { AttributeRow: true }}, R.div {className: "AttributeRowControl"}, R....
# Controlled: @_isControlled() # ImplicitlyControlled: @_isImplicityControlled() } # onClick: @_toggleControl } R.div {className: "AttributeRowLabel"}, R.AttributeLabel {attribute} R.div {className: "AttributeRowExpression"}, R.Expression {attribute} ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
1
42
cdglabs/apparatus:src/View/AttributeRow.coffee:2:raw_corpus
raw_corpus
# _toggleControl: -> # if @_isControlled() # State.Editor.getSelectedElement().removeControlledAttribute(@attribute) # else # State.Editor.getSelectedElement().addControlledAttribute(@attribute) R.create "AttributeLabel", propTypes: attribute: Model.Attribute contextTypes: dragManager...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
44
82
cdglabs/apparatus:src/View/AttributeRow.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # _toggleControl: -> # if @_isControlled() # State.Editor.getSelectedElement().removeControlledAttribute(@attribute) # else # State.Editor.getSelectedElement().addControlledAttribute(@attribute) R.create "AttributeLabel", propTypes: at...
// _toggleControl: -> // if @_isControlled() // State.Editor.getSelectedElement().removeControlledAttribute(@attribute) // else // State.Editor.getSelectedElement().addControlledAttribute(@attribute) R.create("AttributeLabel", { propTypes: { attribute: Model.Attribute }, contextTypes: { dragMa...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
44
82
cdglabs/apparatus:src/View/AttributeRow.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // _toggleControl: -> // if @_isControlled() // State.Editor.getSelectedElement().removeControlledAttribute(@attribute) // else // State.Editor.getSelectedElement().addControlledAttribute(@attribute) R.create("AttributeLabel", { propTypes: { attri...
# _toggleControl: -> # if @_isControlled() # State.Editor.getSelectedElement().removeControlledAttribute(@attribute) # else # State.Editor.getSelectedElement().addControlledAttribute(@attribute) R.create "AttributeLabel", propTypes: attribute: Model.Attribute contextTypes: dragManager...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
44
82
cdglabs/apparatus:src/View/AttributeRow.coffee:2:completion
completion
# _toggleControl: -> # if @_isControlled() # State.Editor.getSelectedElement().removeControlledAttribute(@attribute) # else # State.Editor.getSelectedElement().addControlledAttribute(@attribute) R.create "AttributeLabel", propTypes: attribute: Model.Attribute contextTypes: dragManager...
R.div { className: R.cx { AttributeLabel: true Interactive: true isHovered: hoverManager.hoveredAttribute == attribute # Variable: @node.parent().isVariantOf(Element) } onMouseDown: @_onMouseDown onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
44
82
cdglabs/apparatus:src/View/AttributeRow.coffee:3:raw_corpus
raw_corpus
{attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: mouseDownEvent.clientX y: mouseDownEvent.clientY onMove: (mouseMoveEvent) -> dragManager.dra...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
84
124
cdglabs/apparatus:src/View/AttributeRow.coffee:3:completion
completion
{attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: mouseDownEvent.clientX y: mouseDownEvent.clientY onMove: (mouseMoveEvent) -> dragManager.dra...
return unless focusedCodeMirrorEl expressionCodeEl = Util.closest(focusedCodeMirrorEl, ".ExpressionCode") expressionCode = expressionCodeEl.component expressionCode.transcludeAttribute(attribute) _onMouseEnter: (e) -> {attribute} = @props {dragManager, hoverManager} = @context return if dragM...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
84
124
cdglabs/apparatus:src/View/AttributeRow.coffee:4:raw_corpus
raw_corpus
contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter ...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
126
168
cdglabs/apparatus:src/View/AttributeRow.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute ...
({ contextTypes: { dragManager: R.DragManager, hoverManager: R.HoverManager }, render: function() { var attribute, hoverManager; ({attribute} = this.props); ({hoverManager} = this.context); return R.span({ className: R.cx({ ReferenceToken: true, isHovered: hoverManage...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
126
168
cdglabs/apparatus:src/View/AttributeRow.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ contextTypes: { dragManager: R.DragManager, hoverManager: R.HoverManager }, render: function() { var attribute, hoverManager; ({attribute} = this.props); ({hoverManager} = this.context); return R.span({ className: R.cx({ ...
contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter ...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
126
168
cdglabs/apparatus:src/View/AttributeRow.coffee:4:completion
completion
contextTypes: dragManager: R.DragManager hoverManager: R.HoverManager render: -> {attribute} = @props {hoverManager} = @context R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter ...
# return node if node.isVariantOf(Model.Element) # return @_parentElement(node.parent()) # _label: -> # if @contextAttribute # contextElement = @_parentElement(@contextAttribute) # element = @_parentElement(@attribute) # isSameContext = element.isAncestorOf(contextElement) # if !isS...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
8fb4fe1fe4559809882c314dc7f41deed6791a4a
1,052
https://github.com/cdglabs/apparatus/blob/8fb4fe1fe4559809882c314dc7f41deed6791a4a/src/View/AttributeRow.coffee
126
168
cdglabs/apparatus:src/View/AttributeRow.coffee:3:raw_corpus
raw_corpus
{attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: mouseDownEvent.clientX y: mouseDownEvent.clientY onMove: (mouseMoveEvent) -> dragManager.dra...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
1042e63a5f87ff88ad491d67258903fce8322f2f
1,052
https://github.com/cdglabs/apparatus/blob/1042e63a5f87ff88ad491d67258903fce8322f2f/src/View/AttributeRow.coffee
84
122
cdglabs/apparatus:src/View/AttributeRow.coffee:3:completion
completion
{attribute} = @props {dragManager, hoverManager} = @context mouseDownEvent.preventDefault() dragManager.start mouseDownEvent, type: "transcludeAttribute" attribute: attribute x: mouseDownEvent.clientX y: mouseDownEvent.clientY onMove: (mouseMoveEvent) -> dragManager.dra...
hoverManager.hoveredAttribute = attribute _onMouseLeave: (e) -> {dragManager, hoverManager} = @context return if dragManager.drag? hoverManager.hoveredAttribute = null R.create "AttributeToken", propTypes: attribute: Model.Attribute # contextAttribute: {optional: Model.Attribute} contextTy...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
1042e63a5f87ff88ad491d67258903fce8322f2f
1,052
https://github.com/cdglabs/apparatus/blob/1042e63a5f87ff88ad491d67258903fce8322f2f/src/View/AttributeRow.coffee
84
122
cdglabs/apparatus:src/View/AttributeRow.coffee:4:raw_corpus
raw_corpus
R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave }, attribute.label # # TODO: This helper should be moved somewhere else (Node?) # _parentElement: (node...
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
1042e63a5f87ff88ad491d67258903fce8322f2f
1,052
https://github.com/cdglabs/apparatus/blob/1042e63a5f87ff88ad491d67258903fce8322f2f/src/View/AttributeRow.coffee
124
158
cdglabs/apparatus:src/View/AttributeRow.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave }, attribute.label # # TODO: This helper should ...
R.span({ className: R.cx({ ReferenceToken: true, isHovered: hoverManager.hoveredAttribute === attribute }), onMouseEnter: this._onMouseEnter, onMouseLeave: this._onMouseLeave }, attribute.label); ({ // # TODO: This helper should be moved somewhere else (Node?) // _parentElement: (node) -> // re...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
1042e63a5f87ff88ad491d67258903fce8322f2f
1,052
https://github.com/cdglabs/apparatus/blob/1042e63a5f87ff88ad491d67258903fce8322f2f/src/View/AttributeRow.coffee
124
158
cdglabs/apparatus:src/View/AttributeRow.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript R.span({ className: R.cx({ ReferenceToken: true, isHovered: hoverManager.hoveredAttribute === attribute }), onMouseEnter: this._onMouseEnter, onMouseLeave: this._onMouseLeave }, attribute.label); ({ // # TODO: This helper should be moved somewher...
R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave }, attribute.label # # TODO: This helper should be moved somewhere else (Node?) # _parentElement: (node...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
1042e63a5f87ff88ad491d67258903fce8322f2f
1,052
https://github.com/cdglabs/apparatus/blob/1042e63a5f87ff88ad491d67258903fce8322f2f/src/View/AttributeRow.coffee
124
158
cdglabs/apparatus:src/View/AttributeRow.coffee:4:completion
completion
R.span { className: R.cx { ReferenceToken: true isHovered: hoverManager.hoveredAttribute == attribute } onMouseEnter: @_onMouseEnter onMouseLeave: @_onMouseLeave }, attribute.label # # TODO: This helper should be moved somewhere else (Node?) # _parentElement: (node...
# if @contextAttribute # contextElement = @_parentElement(@contextAttribute) # element = @_parentElement(@attribute) # isSameContext = element.isAncestorOf(contextElement) # if !isSameContext # return @attribute.parent().label + "’s " + @attribute.label # return @attribute.label ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/AttributeRow.coffee
MIT
1042e63a5f87ff88ad491d67258903fce8322f2f
1,052
https://github.com/cdglabs/apparatus/blob/1042e63a5f87ff88ad491d67258903fce8322f2f/src/View/AttributeRow.coffee
124
158