function Stream(data, streamUtilities /*stream, owner, name, parent, type, description, options, changeFlowsFromParent, changeFlowsToParent, firmerThanParent*/) { /*data.Stream, data.Owner, data.Name, data.Parent, mStreamUtilities.typeFromString(data.Type), data.Description, data.Options, data.changeFlowsFromParent == 'true', //these booleans come back as strings, so I have to convert them... data.changeFlowsToParent == 'true', data.firmerThanParent == 'true'*/ // these are all properties of streams this.mType = streamUtilities.typeFromString(data.Type); this.mParent = data.Parent; this.mStream = data.Stream;//depot path this.mOptions = data.Options; this.mOwner = data.Owner; //this is due to some descrepencies between p4 and P4JsApi; TODO: fix this! if( data.Description ) this.mDescription = data.Description; else if( data.desc ) this.mDescription = data.desc; this.Paths = function() { var stream = streamUtilities.getStream(this.mStream); var paths = new Array(); for (var i = 0; stream["Paths" + i] != null; ++i) paths.push(stream["Paths" + i]); return paths; } this.type = function(){ return this.mType; } this.mName = data.Name; this.mChangeFlowsFromParent = data.changeFlowsFromParent == 'true', //these booleans come back as strings, so I have to convert them... this.mChangeFlowsToParent = data.changeFlowsToParent == 'true'; this.mFirmerThanParent = data.firmerThanParent == 'true'; //console.log('stream object: ' + this.mStream + ' changeFlowsFromParent: ' + this.mChangeFlowsFromParent); //TODO by DG: figure out why this makes the x values separate correctly. It's probably something to do with //an 'if' statement in MWLayout thinking the stream is undefined, null, or something along those lines... this.toString = function() { return this.mStream; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8081 | David George |
Initial submit of JavaScript StreamGraph. Main functionality is: Change Trajectory (Change Flow), Timeline, and GitStreams. |