1
0
Fork 0
forked from 0x2620/oxjs

remove unneeded constants

This commit is contained in:
rolux 2012-06-04 11:49:27 +02:00
commit 8581a3da3a
3 changed files with 47 additions and 43 deletions

View file

@ -1,20 +1,19 @@
'use strict';
//@ Ox.AMPM <[str]> ['AM', 'PM']
//@ Ox.AMPM <[s]> ['AM', 'PM']
Ox.AMPM = ['AM', 'PM'];
//@ Ox.BASE_32_ALIASES <o> Base 32 aliases
Ox.BASE_32_ALIASES = {'I': '1', 'L': '1', 'O': '0', 'U': 'V'},
//@ Ox.BASE_32_DIGITS <o> Base 32 digits
Ox.BASE_32_DIGITS = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
//@ Ox.BCAD <[str]> ['BC', 'AD']
//@ Ox.BCAD <[s]> ['BC', 'AD']
Ox.BCAD = ['BC', 'AD'];
// fixme: this is unused, and probably unneeded
//@ Ox.DURATIONS <[str]> ['year', 'month', 'day', 'hour', 'minute', 'second']
Ox.DURATIONS = ['year', 'month', 'day', 'hour', 'minute', 'second'];
//@ Ox.EARTH_RADIUS <number> Radius of the earth in meters
// see http://en.wikipedia.org/wiki/WGS-84
/*@
Ox.EARTH_RADIUS <n> Radius of the earth in meters
See http://en.wikipedia.org/wiki/WGS-84
*/
Ox.EARTH_RADIUS = 6378137;
//@ Ox.EARTH_CIRCUMFERENCE <num> Circumference of the earth in meters
//@ Ox.EARTH_CIRCUMFERENCE <n> Circumference of the earth in meters
Ox.EARTH_CIRCUMFERENCE = Ox.EARTH_RADIUS * 2 * Math.PI;
//@ Ox.HTML_ENTITIES <object> HTML entities for ... (FIXME)
Ox.HTML_ENTITIES = {
@ -53,31 +52,11 @@ Ox.KEYS = {
220: 'backslash', 221: 'closebracket', 222: 'quote', 224: 'meta'
// see dojo, for ex.
},
//@ Ox.KEYWORDS <[s]> JavaScript keywords
// see https://developer.mozilla.org/en/JavaScript/Reference
Ox.KEYWORDS = [
'break',
'case', 'catch', 'class', 'const', 'continue',
'debugger', 'default', 'delete', 'do',
'else', 'enum', 'export', 'extends',
'false', 'finally', 'for', 'function',
'if', 'implements', 'import', 'in', 'instanceof', 'interface',
'let', 'module',
'new', 'null',
'package', 'private', 'protected', 'public',
'return',
'super', 'switch', 'static',
'this', 'throw', 'true', 'try', 'typeof',
'var', 'void',
'yield',
'while', 'with'
];
Ox.MAP_TILE_SIZE = 256; // fixme: definitely not needed here
//@ Ox.MAX_LATITUDE <n> Maximum latitude of a Mercator projection
Ox.MAX_LATITUDE = Ox.deg(Math.atan(Ox.sinh(Math.PI)));
//@ Ox.MIN_LATITUDE <n> Minimum latitude of a Mercator projection
Ox.MIN_LATITUDE = -Ox.MAX_LATITUDE;
//@ Ox.MODIFIER_KEYS <obj> Names for modifier keys
//@ Ox.MODIFIER_KEYS <o> Names for modifier keys
// meta comes last so that one can differentiate between
// alt_control_shift_meta.left and alt_control_shift_meta.right
Ox.MODIFIER_KEYS = {
@ -86,7 +65,7 @@ Ox.MODIFIER_KEYS = {
shiftKey: 'shift',
metaKey: 'meta' // Mac: command
}
//@ Ox.MONTHS <[str]> Names of months
//@ Ox.MONTHS <[s]> Names of months
Ox.MONTHS = [
'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December'
@ -103,11 +82,11 @@ Ox.PATH = Ox.toArray(
})[0].src.replace(/Ox\.js$/, '');
//@ Ox.PREFIXES <[str]> `['', 'K', 'M', 'G', 'T', 'P']`
Ox.PREFIXES = ['', 'K', 'M', 'G', 'T', 'P'];
//@ Ox.SEASONS <[str]> Names of the seasons of the year
//@ Ox.SEASONS <[s]> Names of the seasons of the year
Ox.SEASONS = ['Winter', 'Spring', 'Summer', 'Fall'];
//@ Ox.STACK_SIZE <n> Maximum number of arguments
Ox.STACK_SIZE = 65536;
//@ Ox.SYMBOLS <obj> Unicode characters for symbols
//@ Ox.SYMBOLS <o> Unicode characters for symbols
Ox.SYMBOLS = {
DOLLAR: '\u0024',
CENT: '\u00A2', POUND: '\u00A3', CURRENCY: '\u00A4', YEN: '\u00A5',
@ -133,13 +112,13 @@ Ox.SYMBOLS = {
CLOSE: '\u2715', BALLOT: '\u2717', WINDOWS: '\u2756',
EDIT: '\uF802', CLICK: '\uF803', APPLE: '\uF8FF'
};
//@ Ox.VERSION <str> OxJS version number
//@ Ox.VERSION <s> OxJS version number
Ox.VERSION = '0.1';
//@ Ox.WEEKDAYS <[str]> Names of weekdays
//@ Ox.WEEKDAYS <[s]> Names of weekdays
Ox.WEEKDAYS = [
'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'
];
//@ Ox.SHORT_WEEKDAYS <[str]> Short names of weekdays
//@ Ox.SHORT_WEEKDAYS <[s]> Short names of weekdays
Ox.SHORT_WEEKDAYS = Ox.WEEKDAYS.map(function(val) {
return val.slice(0, 3);
});