mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 17:27:22 +02:00
tried to port one more, broke on events instantiation
This commit is contained in:
parent
8d2803e4e4
commit
6327566a63
6 changed files with 2055 additions and 32 deletions
2036
build/bundle.js
2036
build/bundle.js
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
|||
var Commit = require('./git').Commit;
|
||||
var Branch = require('./git').Branch;
|
||||
var events = require('./main').events;
|
||||
|
||||
var CommitCollection = Backbone.Collection.extend({
|
||||
model: Commit
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var animationFactory = new require('./animationFactory').AnimationFactory();
|
||||
console.log('this is what animatioinf actory is', require('./animationFactory'));
|
||||
var AnimationFactoryModule = require('./animationFactory');
|
||||
var animationFactory = new AnimationFactoryModule.AnimationFactory();
|
||||
|
||||
// backbone or something uses _.uniqueId, so we make our own here
|
||||
var uniqueId = (function() {
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
<!-- vis -->
|
||||
<!-- <script src="collections.js"></script> -->
|
||||
<!-- <script src="visuals.js"></script> -->
|
||||
<script src="tree.js"></script>
|
||||
<!-- <script src="tree.js"></script> -->
|
||||
<!--<script src="animationFactory.js"></script> -->
|
||||
|
||||
<!-- levels -->
|
||||
|
@ -153,9 +153,6 @@
|
|||
<!-- on ready -->
|
||||
<!-- <script src="main.js"></script> -->
|
||||
|
||||
<script type="text/javascript">
|
||||
var events = _.clone(Backbone.Events);
|
||||
</script>
|
||||
<!-- build -->
|
||||
<script src="../build/bundle.js"></script>
|
||||
</body>
|
||||
|
|
14
src/tree.js
14
src/tree.js
|
@ -1,3 +1,9 @@
|
|||
var randomHueString = function() {
|
||||
var hue = Math.random();
|
||||
var str = 'hsb(' + String(hue) + ',0.7,1)';
|
||||
return str;
|
||||
};
|
||||
|
||||
var VisBase = Backbone.Model.extend({
|
||||
removeKeys: function(keys) {
|
||||
_.each(keys, function(key) {
|
||||
|
@ -949,3 +955,11 @@ var VisEdgeCollection = Backbone.Collection.extend({
|
|||
var VisBranchCollection = Backbone.Collection.extend({
|
||||
model: VisBranch
|
||||
});
|
||||
|
||||
exports.VisEdgeCollection = VisEdgeCollection;
|
||||
exports.VisBranchCollection = VisBranchCollection;
|
||||
exports.VisNode = VisNode;
|
||||
exports.VisEdge = VisEdge;
|
||||
exports.VisBranch = VisBranch;
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
var CommitCollection = require('./collections').CommitCollection;
|
||||
var BranchCollection = require('./collections').BranchCollection;
|
||||
var Collections = require('./collections');
|
||||
var CommitCollection = Collections.CommitCollection;
|
||||
var BranchCollection = Collections.BranchCollection;
|
||||
|
||||
var GitEngine = require('./git').GitEngine;
|
||||
|
||||
var Tree = require('./tree');
|
||||
var VisEdgeCollection = Tree.VisEdgeCollection;
|
||||
var VisBranchCollection = Tree.VisBranchCollection;
|
||||
var VisNode = Tree.VisNode;
|
||||
var VisBranch = Tree.VisBranch;
|
||||
var VisEdge = Tree.VisEdge;
|
||||
|
||||
var Visualization = Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
var _this = this;
|
||||
|
@ -665,11 +674,5 @@ function blendHueStrings(hueStrings) {
|
|||
return 'hsb(' + String(hue) + ',' + String(totalSat) + ',' + String(totalBright) + ')';
|
||||
}
|
||||
|
||||
function randomHueString() {
|
||||
var hue = Math.random();
|
||||
var str = 'hsb(' + String(hue) + ',0.7,1)';
|
||||
return str;
|
||||
};
|
||||
|
||||
exports.Visualization = Visualization;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue