Skip to content

Commit

Permalink
Merge pull request #13 from chartjs/Add_CI
Browse files Browse the repository at this point in the history
Add travis CI & fix JShint issues
  • Loading branch information
etimberg authored Jun 12, 2016
2 parents ffe0efb + d34befc commit 6f219db
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: node_js
node_js:
- "6.2"

before_install:
- "export CHROME_BIN=/usr/bin/google-chrome"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

before_script:
- npm install

script:
- gulp jshint

sudo: required
dist: trusty

addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
4 changes: 4 additions & 0 deletions config.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"node": true,
"predef": [ "require", "module" ]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"gulp-util": "^3.0.7",
"inquirer": "^1.0.2",
"jshint": "^2.9.2",
"jshint-stylish": "^2.2.0",
"merge-stream": "^1.0.0",
"semver": "^5.1.0",
"vinyl-source-stream": "^1.1.0"
Expand Down
18 changes: 9 additions & 9 deletions src/chart.zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function doZoom(chartInstance, zoom, center) {
center = {
x: (ca.left + ca.right) / 2,
y: (ca.top + ca.bottom) / 2,
}
};
}

var zoomOptions = chartInstance.options.zoom;
Expand Down Expand Up @@ -164,14 +164,14 @@ function positionInChartArea(chartInstance, position) {
}

// Store these for later
zoomNS.zoomFunctions['category'] = zoomIndexScale;
zoomNS.zoomFunctions['time'] = zoomTimeScale;
zoomNS.zoomFunctions['linear'] = zoomNumericalScale;
zoomNS.zoomFunctions['logarithmic'] = zoomNumericalScale;
zoomNS.panFunctions['category'] = panIndexScale;
zoomNS.panFunctions['time'] = panTimeScale;
zoomNS.panFunctions['linear'] = panNumericalScale;
zoomNS.panFunctions['logarithmic'] = panNumericalScale;
zoomNS.zoomFunctions.category = zoomIndexScale;
zoomNS.zoomFunctions.time = zoomTimeScale;
zoomNS.zoomFunctions.linear = zoomNumericalScale;
zoomNS.zoomFunctions.logarithmic = zoomNumericalScale;
zoomNS.panFunctions.category = panIndexScale;
zoomNS.panFunctions.time = panTimeScale;
zoomNS.panFunctions.linear = panNumericalScale;
zoomNS.panFunctions.logarithmic = panNumericalScale;

// Chartjs Zoom Plugin
var zoomPlugin = {
Expand Down

0 comments on commit 6f219db

Please sign in to comment.