Skip to content

Commit

Permalink
Increased scope of lint check, removed some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Dec 13, 2014
1 parent 48af3b3 commit 7fc2a0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');

var paths = {
scripts: ['./src/*.js']
scripts: ['./src/**/*.js', '!**/parser/*.js']
};

gulp.task('jison2', function() {
Expand All @@ -40,7 +40,7 @@ gulp.task('dist', ['slimDist', 'fullDist','jasmine']);

var jasmine = require('gulp-jasmine');

gulp.task('jasmine',['jison'], function () {
gulp.task('jasmine',['jison','lint'], function () {
return gulp.src(['src/**/*.spec.js'])
.pipe(jasmine({includeStackTrace:true}));
});
Expand Down
8 changes: 2 additions & 6 deletions src/diagrams/flowchart/flowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
var graph = require('./graphDb');
var flow = require('./parser/flow');
var dot = require('./parser/dot');
var utils = require('../../utils');
var he = require('he');
var dagreD3 = require('dagre-d3');
/**
* Function that adds the vertices found in the graph definition to the graph to be rendered.
Expand Down Expand Up @@ -207,7 +205,7 @@ exports.draw = function (text, id,isDot) {
{x: s / 2, y: -s},
{x: 0, y: -s / 2}
];
shapeSvg = parent.insert("polygon", ":first-child")
var shapeSvg = parent.insert("polygon", ":first-child")
.attr("points", points.map(function (d) {
return d.x + "," + d.y;
}).join(" "))
Expand All @@ -233,7 +231,7 @@ exports.draw = function (text, id,isDot) {
{x: -h/2, y: -h},
{x: 0, y: -h/2},
];
shapeSvg = parent.insert("polygon", ":first-child")
var shapeSvg = parent.insert("polygon", ":first-child")
.attr("points", points.map(function (d) {
return d.x + "," + d.y;
}).join(" "))
Expand Down Expand Up @@ -271,8 +269,6 @@ exports.draw = function (text, id,isDot) {
render(d3.select("#" + id + " g"), g);

// Center the graph
var xCenterOffset = (svg.attr("width") - g.graph().width) / 2;
//svgGroup.attr("transform", "translate(" + xCenterOffset + ", 20)");
svg.attr("height", g.graph().height );
svg.attr("width", g.graph().width );
};
4 changes: 2 additions & 2 deletions src/diagrams/flowchart/graphDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ exports.setClickEvent = function (id,functionName) {
var elem = document.getElementById(id2);
if (elem !== null) {
elem.onclick = function () {
eval(functionName + '(\'' + id2 + '\')');
eval(functionName + '(\'' + id2 + '\')'); // jshint ignore:line
};
}
});
Expand All @@ -142,7 +142,7 @@ exports.setClickEvent = function (id,functionName) {
var elem = document.getElementById(id);
if(elem !== null){
//console.log('id was NOT null: '+id);
elem.onclick = function(){eval(functionName+'(\'' + id + '\')');};
elem.onclick = function(){eval(functionName+'(\'' + id + '\')');}; // jshint ignore:line
}
else{
//console.log('id was null: '+id);
Expand Down
Loading

0 comments on commit 7fc2a0a

Please sign in to comment.