Commit Graph

42 Commits

Author SHA1 Message Date
Jeff Avallone
6c5b36f334 Changing util.js to export an object
This allows the methods to be spied on in tests
2014-12-20 10:25:32 -05:00
Jeff Avallone
a50ba68a21 Moving spaceHorizontally and spaceVertically to util.js 2014-12-19 12:11:44 -05:00
Jeff Avallone
870b2e6ed4 Moving normalizeBBox to util.js 2014-12-19 12:06:21 -05:00
Jeff Avallone
17a95392a8 Refactoring property definition code 2014-12-17 16:04:55 -05:00
Jeff Avallone
a0f145ab3d Removing unnecessary atype attributes 2014-12-17 15:48:06 -05:00
Jeff Avallone
f93388dec0 Converting getAnchor into a property 2014-12-17 15:24:27 -05:00
Jeff Avallone
c5c98ad62f Simplifying node proxy code 2014-12-17 15:12:04 -05:00
Jeff Avallone
dd6eac2b4e Simplifying literal merging code 2014-12-17 14:56:02 -05:00
Jeff Avallone
e362a54551 Converting methods into properties where possible/reasonable 2014-12-17 14:44:48 -05:00
Jeff Avallone
57ccd4b0c5 Refactoring to enhance the SyntaxNode extending 2014-12-17 11:53:04 -05:00
Jeff Avallone
84d3fe797d Removing unnecessary binds 2014-12-15 22:00:24 -05:00
Jeff Avallone
d22ab35b68 Converting uses of Snap.format to use template literals 2014-12-15 21:51:17 -05:00
Jeff Avallone
95af49e385 Adding horizontal connecting lines 2014-12-14 21:37:56 -05:00
Jeff Avallone
c2d8473425 Adding node-type-specific anchor code 2014-12-14 19:13:08 -05:00
Jeff Avallone
d216c0fe5f Simplifying more code 2014-12-13 13:42:55 -05:00
Jeff Avallone
cb9785de91 Folding _position methods into render method promises 2014-12-13 12:55:03 -05:00
Jeff Avallone
29316bb2aa Updating renderLabel to be promise based 2014-12-13 12:28:16 -05:00
Jeff Avallone
773fd5c1a6 Refactoring how _position is called to be promise-based
The render method now returns a promise. Once this promise is resolved,
the _position method for that node will be called (if applicable). This
promise must be resolved only after all subordinate nodes have completed
their render phase (the promise returned by subordinate node's render
method has resolved). Node that do not have subordinates can return the
result of calling terminalRender, and proxied renders only need to
return the result of calling proxy.

With this change, it is no longer necessary to explicitly position
subordinate nodes. They will already be positioned once their render
promise is resolved.
2014-12-13 09:09:58 -05:00
Jeff Avallone
340d6b4859 Simplifying literal normalization code 2014-12-10 20:11:51 -05:00
Jeff Avallone
2e60561be6 Cleaning up code for match node 2014-12-10 19:58:36 -05:00
Jeff Avallone
dbcdd583ed Removing need for separate setContainer calls 2014-12-10 19:31:07 -05:00
Jeff Avallone
15655900f1 Updating to automatically size labels when positioning 2014-12-10 19:16:21 -05:00
Jeff Avallone
d953dcaab4 renderLabel method doesn't really need a container argument 2014-12-10 19:12:17 -05:00
Jeff Avallone
f0c25dfc41 Simplifying code related to passing rendering through to nested node 2014-12-10 19:01:57 -05:00
Jeff Avallone
fc7032241f Short-circuiting the render of nodes.
This will reduce the depth of nesting of elements (and hopefully make
final positioning easier)
2014-12-10 17:16:21 -05:00
Jeff Avallone
b13ee3add2 Removing some connecting lines
This is in preparation for properly aligning nodes and simplifying the
connecting lines to reduce the number of path elements required.
2014-12-10 17:13:23 -05:00
Jeff Avallone
6ab5b2993b Removing references to "self" 2014-12-10 17:01:21 -05:00
Jeff Avallone
0b85f552c3 Setting class names of nodes automatically 2014-12-10 16:57:42 -05:00
Jeff Avallone
cd11b7e6e5 Centralizing some of the layout code 2014-12-09 19:02:31 -05:00
Jeff Avallone
7ed865ecdb Normalizing function names 2014-12-09 18:08:40 -05:00
Jeff Avallone
f5d1e734f1 Removing Terminal type and replacing with Literal, Escape, and AnyChar
This is to eventually simplify the combining of Literals together (and
to actually make it work correctly, since terminals should not have been
merged)
2014-12-06 16:03:58 -05:00
Jeff Avallone
41c11ad5d4 Fixing bug with concatenation of literals 2014-12-06 15:46:46 -05:00
Jeff Avallone
d9abd5f139 Removing an extraneous connecting line 2014-12-04 21:23:18 -05:00
Jeff Avallone
5a000ec302 Adding spacing between MatchFragments 2014-12-03 20:26:09 -05:00
Jeff Avallone
502e4494d9 Some cleanup 2014-12-03 20:20:08 -05:00
Jeff Avallone
d1a058768e Adding some styling to start and end anchors 2014-12-03 20:02:56 -05:00
Jeff Avallone
a88c4821b7 Refactoring to remove the container argument to render methods
A reference was being kept generally, so it was more useful to keep it
connected to the node
2014-12-03 18:59:59 -05:00
Jeff Avallone
fe6727b79a Removing some debugging code 2014-12-03 18:46:40 -05:00
Jeff Avallone
b364198030 Adding a MatchFragment rule
Also reducing the amount of object cloning that is being done
2014-12-02 21:09:20 -05:00
Jeff Avallone
7d84669536 First cut of rendering match elements
This is currently broken, but a starting point for further work.
2014-12-02 21:02:48 -05:00
Jeff Avallone
b9dd80a142 Adding type values to node extensions
These will be useful later
2014-12-02 20:10:56 -05:00
Jeff Avallone
f8cded8eac Adding first cut of code to render alternations
Still need to implement lines to the individual parts
2014-11-30 17:54:12 -05:00