Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 580ad62
Showing
30 changed files
with
3,531 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// MyUtillities.js | ||
// Copyright (c) Christoph Pacher (http://www.christophpacher.com) | ||
|
||
var MyUtilities = { | ||
getWindowDimensions: function() { | ||
var myWidth = myHeight = 0; | ||
if( typeof( window.innerWidth ) == 'number' ) { | ||
//Non-IE | ||
myWidth = window.innerWidth; | ||
myHeight = window.innerHeight; | ||
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { | ||
//IE 6+ in 'standards compliant mode' | ||
myWidth = document.documentElement.clientWidth; | ||
myHeight = document.documentElement.clientHeight; | ||
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { | ||
//IE 4 compatible | ||
myWidth = document.body.clientWidth; | ||
myHeight = document.body.clientHeight; | ||
} | ||
return {width: myWidth, height: myHeight}; | ||
}, | ||
clamp: function(a, low, high){ | ||
return Math.max(low, Math.min(a, high)); | ||
}, | ||
copyArray: function(a){ | ||
newA = new Array(); | ||
var l = a.length; | ||
for (var i = 0; i < l; i++) | ||
{ | ||
newA[i] = a[i]; | ||
} | ||
return newA; | ||
} | ||
}; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.