coding standards

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3802 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-07-24 21:18:01 +00:00
parent 47014dc7d7
commit 1d17ebba37

View File

@@ -152,14 +152,20 @@ Number.prototype.limitSigDigs = function(sig) {
* {Function}
*/
Function.prototype.bind = function() {
var __method = this, args = [], object = arguments[0];
for (var i = 1; i < arguments.length; i++)
args.push(arguments[i]);
return function(moreargs) {
for (var i = 0; i < arguments.length; i++)
args.push(arguments[i]);
return __method.apply(object, args);
}
var __method = this;
var args = [];
var object = arguments[0];
for (var i = 1; i < arguments.length; i++) {
args.push(arguments[i]);
}
return function(moreargs) {
for (var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
return __method.apply(object, args);
};
};
/**
@@ -174,8 +180,8 @@ Function.prototype.bind = function() {
* {Function}
*/
Function.prototype.bindAsEventListener = function(object) {
var __method = this;
return function(event) {
return __method.call(object, event || window.event);
}
var __method = this;
return function(event) {
return __method.call(object, event || window.event);
};
};