couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowalski <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Gsoc2015 moving to sub
Date Mon, 18 May 2015 15:08:26 GMT
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/401#discussion_r30515944
  
    --- Diff: app/addons/documents/revisionTree/component.react.jsx ---
    @@ -0,0 +1,332 @@
    +define([
    +  "app",
    +  "api",
    +  "react",
    +  'addons/documents/revisionTree/stores',
    +  'addons/documents/revisionTree/actions',
    +],
    +
    +function (app, FauxtonAPI, React, Stores) {
    +
    +  var store = Stores.revTreeStore;
    +  var lineObjs = [];
    +  var nodeObjs = [];
    +  var textObjs = [];
    +  var grid = 100;
    +  var scale = 7;
    +  var r = 15;
    +
    +  var LinesBox = React.createClass({
    +    render: function () {
    +      return (
    +        <g>
    +          {
    +            this.props.data.map(function (element, i) {
    +              return <Line key={i} data={element}/>;
    +            })
    +          }
    +        </g>
    +      );
    +    }
    +  });
    +
    +  var CirclesBox = React.createClass({
    +
    +    render: function () {
    +      return (
    +        <g>
    +          {
    +            this.props.data.map (function (element, i) {
    +              return <Circle key={i} data={element}/>;
    +            })
    +          }
    +        </g>
    +      );
    +    }
    +  });
    +
    +  var Circle = React.createClass({
    +
    +    render: function () {
    +      var cx = this.props.data.x;
    +      var cy = this.props.data.y;
    +      var radius = r;
    +      var classVal = this.props.data.class;
    +
    +      return (
    +        <circle cx={cx} cy={cy} r={radius} className={classVal}>{this.props.children}</circle>
    +      );
    +    }
    +  });
    +
    +  var Line = React.createClass({
    +
    +    render: function () {
    +      var x1 = this.props.data.x;
    +      var y1 = this.props.data.y;
    +      var x2 = this.props.data.nextX;
    +      var y2 = this.props.data.nextY;
    +
    +      return (
    +        <line x1={x1} y1={y1} x2={x2} y2={y2}>{this.props.children}</line>
    +      );
    +    }
    +  });
    +
    +  var TextsBox = React.createClass({
    +
    +    render: function () {
    +      return (
    +        <g>{this.props.children}</g>
    +      );
    +    }
    +  });
    +
    +  var SVGComponent = React.createClass({
    +
    +    render: function () {
    +      return (
    +        <svg height="500" width="500">{this.props.children}
    +        </svg>
    +      );
    +    }
    +  });
    +
    +  var Box = React.createClass({
    +
    +    render: function () {
    +      return (
    +        <div className = "visualizeRevTree">
    --- End diff --
    
    `className="visualizeRevTree"` (without space)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message