This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let index = -1 | |
| do { | |
| index += 1 | |
| const nodes = walker.currentNodes | |
| for (const node of nodes) { | |
| row.addNode(node) | |
| } | |
| walker.nextStep() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.nodes = this.walkers.map(walker => { | |
| walker.advance() | |
| let node = walker.currentNode | |
| const positions = this.walkers.map(walker => walker.positionFor(node)) | |
| if (!node || Math.max.apply(this, positions) > this.index) { | |
| node = walker.passthrough() | |
| } | |
| return node | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Branch { | |
| constructor(nodes) { | |
| this.branches = [] | |
| this.nodes = [] | |
| _.compact(_.flatten([nodes])).map(node => { | |
| this.insertNode(node) | |
| }) | |
| this.dataset = {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Linker { | |
| constructor(nodes, edges) { | |
| this.cache = new Cache(nodes, edges) | |
| } | |
| process(edges) { | |
| const nodes = this.link(this.findRootEdges(edges)) | |
| Object.defineProperty(this, "nodes", { | |
| value: Object.freeze(nodes) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Linker { | |
| constructor(nodes) { | |
| this.cache = this.create(nodes) | |
| } | |
| process(edges) { | |
| const nodes = this.link(this.findRootEdges(edges)) | |
| Object.freeze(nodes) | |
| Object.defineProperty(this, "nodes", { | |
| value: nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.querySelector(`workflow-node[data-sources~='${this.dataset.oid}']`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nodes": [ | |
| {"id": "1", "name": "A node"}, | |
| {"id": "2", "name": "Another node"}, | |
| ], | |
| "edges": [ | |
| {"source": "1", "target": "2"} | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| startsWith() { | |
| return ( | |
| <div id="hello"> | |
| </div> | |
| ); | |
| } | |
| test() { | |
| document.getElementById("hello") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= url('/:post.year/:post.month/:post.slug', post: post) %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Post | |
| def year | |
| self.published_at.month | |
| end | |
| def month | |
| self.published_at.month | |
| end | |
| def to_params |
NewerOlder