Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonLesti committed Apr 14, 2016
1 parent abf226e commit 72be18b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ before_script:
- npm install -g grunt-cli

script:
- grunt ci
- ./node_modules/.bin/grunt ci

after_script:
- grunt coveralls
- ./node_modules/.bin/grunt coveralls

env:
global:
Expand Down
9 changes: 3 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function( grunt ) {
{ browserName: "firefox", version: "41", platform: "Windows 10" },
{ browserName: "internet explorer", version: "11", platform: "Windows 10" },

// Mac
// Apple Mac
{ browserName: "chrome", version: "46", platform: "OS X 10.11" },
{ browserName: "firefox", version: "41", platform: "OS X 10.11" },
{ browserName: "safari", version: "9", platform: "OS X 10.11" },
Expand All @@ -28,11 +28,11 @@ module.exports = function( grunt ) {
{ browserName: "chrome", version: "46", platform: "Linux" },
{ browserName: "firefox", version: "41", platform: "Linux" },

// iOS
// Apple iOS
{ browserName: "iphone", version: "8.4" },
{ browserName: "ipad", version: "8.4" },

// Android
// Google Android
{ browserName: "android", version: "4.4" },
{ browserName: "android", version: "5.1" }
];
Expand All @@ -55,8 +55,6 @@ module.exports = function( grunt ) {
},
coveralls: {
options: {

// do not fail if coveralls fails
force: true
},

Expand Down Expand Up @@ -124,7 +122,6 @@ module.exports = function( grunt ) {
watch: {}
} );

// Loading dependencies
for ( key in grunt.file.readJSON( "package.json" ).devDependencies ) {
if ( key !== "grunt" && key.indexOf( "grunt" ) === 0 ) {
grunt.loadNpmTasks( key );
Expand Down
2 changes: 1 addition & 1 deletion dist/broiler.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "broilerjs",
"version": "1.0.0",
"version": "1.0.2",
"description": "A simple, lightweight jQuery plugin to get the color of an image pixel by click.",
"main": "src/broiler.js",
"scripts": {
Expand All @@ -25,15 +25,16 @@
"homepage": "https://github.com/GordonLesti/broilerjs",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^1.2.0",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-qunit": "^0.5.2",
"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-qunit": "^1.2.0",
"grunt-contrib-uglify": "^1.0.1",
"grunt-contrib-watch": "^1.0.0",
"grunt-coveralls": "^1.0.0",
"grunt-jscs": "^1.5.0",
"grunt-jsonlint": "^1.0.4",
"grunt-qunit-istanbul": "^0.4.7",
"grunt-saucelabs": "^8.6.0"
"grunt-jscs": "^2.8.0",
"grunt-jsonlint": "^1.0.7",
"grunt-qunit-istanbul": "^0.6.0",
"grunt-saucelabs": "^8.6.2"
}
}
12 changes: 6 additions & 6 deletions src/broiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
}( function( $ ) {
"use strict";
$.fn.broiler = function( callBack ) {
var image = this[0],
canvas = $( "<canvas/>" )[0],
var image = this[ 0 ],
canvas = $( "<canvas/>" )[ 0 ],
imageData;
canvas.width = image.width;
canvas.height = image.height;
Expand All @@ -31,10 +31,10 @@
y = Math.round( event.clientY - offset.top + scrollTop );
start = ( x + y * image.width ) * 4;
callBack( {
r: imageData[start],
g: imageData[start + 1],
b: imageData[start + 2],
a: imageData[start + 3]
r: imageData[ start ],
g: imageData[ start + 1 ],
b: imageData[ start + 2 ],
a: imageData[ start + 3 ]
} );
} );
};
Expand Down

0 comments on commit 72be18b

Please sign in to comment.