Commit bd74dbaa by Tomas Alabes

Added couple of fixes, and unused jshintrc

parent 4e025f74
{
"curly": true,
"eqnull": true,
"eqeqeq": true,
"undef": true,
"indent": 4,
"globals": {
"eve": true
}
}
\ No newline at end of file
......@@ -10,6 +10,13 @@ module.exports = function(grunt) {
pkg: pkg,
banner: grunt.file.read("copy.js").replace(/@VERSION/, pkg.version),
// Task configuration.
jshint: {
beforeconcat: ['raphael.core.js', 'raphael.svg.js', 'raphael.vml.js'],
afterconcat: ['dist/raphael.js'],
"options": {
jshintrc: '.jshintrc'
}
},
uglify: {
options: {
banner: "<%= banner %>"
......@@ -38,8 +45,9 @@ module.exports = function(grunt) {
// These plugins provide necessary tasks.
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks('grunt-contrib-jshint');
// Special concat/build task to handle Raphael's build requirements
// Special concat/build task to handle Raphael's build requirements
grunt.registerMultiTask(
"build",
"Concatenate source, remove individual closures, embed version",
......@@ -87,5 +95,5 @@ module.exports = function(grunt) {
});
// Default task.
grunt.registerTask("default", ["build", "uglify"]);
grunt.registerTask("default", ["build", /*"jshint",*/ "uglify"]); //Removed jshint because of too many errors, improving little by little...
};
......@@ -16,6 +16,7 @@
"gitHead": "52bff469f60988f1391e8b3d7cb5349163df8ba1",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.0"
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.7.1"
}
}
......@@ -5382,6 +5382,11 @@
| paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();
\*/
R.st = setproto;
eve.on("raphael.DOMload", function () {
loaded = true;
});
// Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
(function (doc, loaded, f) {
if (doc.readyState == null && doc.addEventListener){
......@@ -5397,10 +5402,6 @@
isLoaded();
})(document, "DOMContentLoaded");
eve.on("raphael.DOMload", function () {
loaded = true;
});
// EXPOSE
// SVG and VML are appended just before the EXPOSE line
// Even with AMD, Raphael should be defined globally
......
......@@ -910,6 +910,12 @@ window.Raphael && window.Raphael.svg && function(R) {
this.show();
var hide = true;
}
var canvasHidden = false,
containerStyle = this.paper.canvas.parentElement.style;
if(containerStyle.display == "none"){
canvasHidden = true;
containerStyle.display = "";
}
var bbox = {};
try {
bbox = this.node.getBBox();
......@@ -917,6 +923,9 @@ window.Raphael && window.Raphael.svg && function(R) {
// Firefox 3.0.x plays badly here
} finally {
bbox = bbox || {};
if(canvasHidden){
containerStyle.display = "none";
}
}
hide && this.hide();
return bbox;
......
......@@ -27,7 +27,7 @@ window.Raphael && window.Raphael.vml && function(R) {
bites = /([clmz]),?([^clmz]*)/gi,
blurregexp = / progid:\S+Blur\([^\)]+\)/g,
val = /-?[^,\s-]+/g,
cssDot = "position:absolute;left:0;top:0;width:1px;height:1px",
cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",
zoom = 21600,
pathTypes = {path: 1, rect: 1, image: 1},
ovalTypes = {circle: 1, ellipse: 1},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5761,6 +5761,11 @@
| paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();
\*/
R.st = setproto;
eve.on("raphael.DOMload", function () {
loaded = true;
});
// Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html
(function (doc, loaded, f) {
if (doc.readyState == null && doc.addEventListener){
......@@ -5776,10 +5781,6 @@
isLoaded();
})(document, "DOMContentLoaded");
eve.on("raphael.DOMload", function () {
loaded = true;
});
// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël - JavaScript Vector Library │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
......@@ -6695,6 +6696,12 @@
this.show();
var hide = true;
}
var canvasHidden = false,
containerStyle = this.paper.canvas.parentElement.style;
if(containerStyle.display == "none"){
canvasHidden = true;
containerStyle.display = "";
}
var bbox = {};
try {
bbox = this.node.getBBox();
......@@ -6702,6 +6709,9 @@
// Firefox 3.0.x plays badly here
} finally {
bbox = bbox || {};
if(canvasHidden){
containerStyle.display = "none";
}
}
hide && this.hide();
return bbox;
......@@ -7192,7 +7202,7 @@
bites = /([clmz]),?([^clmz]*)/gi,
blurregexp = / progid:\S+Blur\([^\)]+\)/g,
val = /-?[^,\s-]+/g,
cssDot = "position:absolute;left:0;top:0;width:1px;height:1px",
cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",
zoom = 21600,
pathTypes = {path: 1, rect: 1, image: 1},
ovalTypes = {circle: 1, ellipse: 1},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment