Skip to content

Commit

Permalink
Merge pull request #159 from chill117/update-to-latest
Browse files Browse the repository at this point in the history
Update to latest
  • Loading branch information
kumilingus committed Jul 23, 2015
2 parents 543fbf4 + 4683184 commit b20c2cf
Show file tree
Hide file tree
Showing 78 changed files with 120,590 additions and 141,065 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"dependencies": {
"lodash": "2.4.1",
"backbone": "1.1.2",
"jquery": "2.1.3",
"backbone": "1.2.1",
"jquery": "2.0.3",
"graphlib": "1.0.1",
"dagre": "0.7.1"
},
Expand Down
2 changes: 1 addition & 1 deletion demo/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<div id="paper"></div>

<script src="../lib/jquery/dist/jquery.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

Expand Down
21 changes: 20 additions & 1 deletion demo/filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,26 @@

<div id="paper"></div>

<script src="../dist/joint.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

<script src="../src/core.js"></script>
<script src="../src/geometry.js"></script>
<script src="../src/vectorizer.js"></script>


<script src="../src/joint.dia.graph.js"></script>

<script src="../src/joint.dia.cell.js"></script>
<script src="../src/joint.dia.element.js"></script>
<script src="../src/joint.dia.link.js"></script>
<script src="../src/joint.dia.paper.js"></script>

<script src="../plugins/joint.shapes.basic.js"></script>

<script src="../plugins/connectors/joint.connectors.normal.js"></script>

<script src="./filters.js"></script>

</body>
Expand Down
2 changes: 1 addition & 1 deletion demo/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var el = new joint.shapes.basic.Rect({
var dropShadow = el.clone();
dropShadow.translate(20, 20);
dropShadow.attr('text/text', 'dropShadow(2,2,3)');
dropShadow.attr('rect/filter', { name: 'dropShadow', args: { dx: 2, dy: 2, blur: 3 } });
dropShadow.attr('rect/filter', { name: 'dropShadow', args: { dx: 2, dy: 2, blur: 5, opacity: .8 } });
graph.addCell(dropShadow);

var blur = el.clone();
Expand Down
19 changes: 18 additions & 1 deletion demo/gradients.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,24 @@

<div id="paper"></div>

<script src="../dist/joint.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

<script src="../src/core.js"></script>
<script src="../src/geometry.js"></script>
<script src="../src/vectorizer.js"></script>


<script src="../src/joint.dia.graph.js"></script>

<script src="../src/joint.dia.cell.js"></script>
<script src="../src/joint.dia.element.js"></script>
<script src="../src/joint.dia.link.js"></script>
<script src="../src/joint.dia.paper.js"></script>

<script src="../plugins/joint.shapes.basic.js"></script>

<script src="./gradients.js"></script>

</body>
Expand Down
24 changes: 23 additions & 1 deletion demo/interpreter.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<title>Interpreter</title>

<link rel="stylesheet" type="text/css" href="../dist/joint.css" />
<link rel="stylesheet" type="text/css" href="../dist/joint.ui.halo.css" />

<style>
html, body { margin: 0; padding: 0 }
Expand All @@ -24,7 +25,28 @@
Click an element to trigger a signal on it.
</p>

<script src="../dist/joint.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

<script src="../src/core.js"></script>
<script src="../src/geometry.js"></script>
<script src="../src/vectorizer.js"></script>


<script src="../src/joint.dia.graph.js"></script>

<script src="../src/joint.dia.cell.js"></script>
<script src="../src/joint.dia.element.js"></script>
<script src="../src/joint.dia.link.js"></script>
<script src="../src/joint.dia.paper.js"></script>

<script src="../dist/joint.ui.halo.js"></script>

<script src="../plugins/joint.shapes.basic.js"></script>

<script src="../plugins/connectors/joint.connectors.normal.js"></script>

<script src="./interpreter.js"></script>

</body>
Expand Down
22 changes: 6 additions & 16 deletions demo/interpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ graph.addCells([l1, l2]);
paper.on('cell:pointerdown', function(cellView) {

cellView.model.trigger('signal', cellView.model);

var halo = new joint.ui.Halo({ graph: graph, paper: paper, cellView: cellView });
halo.render();
});


Expand All @@ -52,10 +55,10 @@ graph.on('signal', function(cell, data) {
if (cell instanceof joint.dia.Link) {

var targetCell = graph.getCell(cell.get('target').id);
sendToken(cell, 1, function() {

targetCell.trigger('signal', targetCell);
});
paper.findViewByModel(cell).sendToken(V('circle', { r: 7, fill: 'green' }).node, 1000, function() {
targetCell.trigger('signal', targetCell);
});

} else {

Expand All @@ -73,16 +76,3 @@ function flash(cell) {
cellView.highlight();
_.delay(function() { cellView.unhighlight(); }, 200);
}

function sendToken(link, sec, callback) {

var token = V('circle', { r: 7, fill: 'green' });

$(paper.viewport).append(token.node);
token.animateAlongPath({ dur: sec + 's', repeatCount: 1 }, paper.findViewByModel(link).$('.connection')[0]);

_.delay(function() {
token.remove();
callback();
}, sec * 1000);
}
2 changes: 1 addition & 1 deletion demo/links-sticky-points.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h1>Links sticky points</h1>
<div id="paper"></div>

<script src="../lib/jquery/dist/jquery.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

Expand Down
5 changes: 3 additions & 2 deletions demo/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<style>
#paper {
width: 800px;
height: 1200px;
height: 1400px;
border: 1px solid gray;
}
</style>
Expand All @@ -21,7 +21,7 @@
<label>Perpendicular links</label><input type="checkbox" id="perpendicularLinks" />
<div id="paper"></div>

<script src="../lib/jquery/dist/jquery.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

Expand All @@ -42,6 +42,7 @@
<script src="../plugins/routers/joint.routers.orthogonal.js"></script>
<script src="../plugins/routers/joint.routers.manhattan.js"></script>
<script src="../plugins/routers/joint.routers.metro.js"></script>
<script src="../plugins/routers/joint.routers.oneSide.js"></script>

<script src="../plugins/connectors/joint.connectors.normal.js"></script>
<script src="../plugins/connectors/joint.connectors.rounded.js"></script>
Expand Down
19 changes: 18 additions & 1 deletion demo/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var paper = new joint.dia.Paper({

el: $('#paper'),
width: 800,
height: 1200,
height: 1400,
gridSize: 1,
perpendicularLinks: false,
model: graph,
Expand Down Expand Up @@ -382,4 +382,21 @@ V(paper.viewport).defs().append(diamondMarker);

graph.addCell([link10]);

// OneSide routing

title(250, 1200, 'OneSide routing');

var r19 = r17.clone();
graph.addCell(r19);
r19.translate(0, 150);

var r20 = r19.clone();
graph.addCell(r20);
r20.translate(200, 0);

var link12 = new joint.dia.Link({
source: { id: r19.id },
target: { id: r20.id },
router: { name: 'oneSide', args: { side: 'bottom' }}
});
graph.addCell(link12);
18 changes: 17 additions & 1 deletion demo/transition.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,23 @@

<div id="paper"></div>

<script src="../dist/joint.js"></script>
<script src="../lib/jquery/jquery.js"></script>
<script src="../lib/lodash/dist/lodash.js"></script>
<script src="../lib/backbone/backbone.js"></script>

<script src="../src/core.js"></script>
<script src="../src/geometry.js"></script>
<script src="../src/vectorizer.js"></script>

<script src="../src/joint.dia.graph.js"></script>

<script src="../src/joint.dia.cell.js"></script>
<script src="../src/joint.dia.element.js"></script>
<script src="../src/joint.dia.link.js"></script>
<script src="../src/joint.dia.paper.js"></script>

<script src="../plugins/joint.shapes.basic.js"></script>

<script src="./transition.js"></script>

</body>
Expand Down
Loading

0 comments on commit b20c2cf

Please sign in to comment.