minor changes in OxJS
This commit is contained in:
parent
66934d22a9
commit
f76ee0cf36
6 changed files with 16 additions and 6 deletions
|
@ -449,8 +449,10 @@ Ox.Map = function(options, self) {
|
|||
delete window.googleCallback;
|
||||
initMap();
|
||||
};
|
||||
$.getScript(document.location.protocol
|
||||
+ '//maps.google.com/maps/api/js?callback=googleCallback&sensor=false');
|
||||
$.getScript(
|
||||
document.location.protocol
|
||||
+ '//maps.google.com/maps/api/js?callback=googleCallback&sensor=false'
|
||||
);
|
||||
} else {
|
||||
(function interval() {
|
||||
window.google ? initMap() : setTimeout(interval, 100);
|
||||
|
|
|
@ -149,7 +149,7 @@ Ox.SmallVideoTimelineImage = function(options, self) {
|
|||
Ox.loop(left, right, function(x) {
|
||||
Ox.loop(top, bottom, function(y) {
|
||||
var alpha = self.options.type == 'player' ? 128
|
||||
: (y == top || y == bottom - 1) ? 255 : 64,
|
||||
: (y == top || y == bottom - 1) ? 255 : 255,
|
||||
color = Ox.Theme[self.theme].timeline[
|
||||
self.options.editing ? 'editing'
|
||||
: self.options.selected ? 'selected' : 'default'
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"color": 0.25
|
||||
},
|
||||
"timeline": {
|
||||
"default": [0, 0, 0],
|
||||
"default": [128, 128, 128],
|
||||
"editing": [0, 0, 128],
|
||||
"result": [128, 128, 0],
|
||||
"selected": [0, 128, 0]
|
||||
|
|
|
@ -5,7 +5,6 @@ Ox.compact <f> Returns an array w/o <code>undefined</code> values
|
|||
> Ox.compact([null,,1,,2,,3])
|
||||
[1, 2, 3]
|
||||
@*/
|
||||
|
||||
Ox.compact = function(arr) {
|
||||
return arr.filter(function(val) {
|
||||
return !Ox.isNull(val) && !Ox.isUndefined(val);
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
|
||||
/*@
|
||||
Ox.crossesDateline <f> Returns true if a given line crosses the dateline
|
||||
> Ox.crossesDateline({lat: 0, lng: -90}, {lat: 0, lng: 90})
|
||||
false
|
||||
> Ox.crossesDateline({lat: 0, lng: 90}, {lat: 0, lng: -90})
|
||||
true
|
||||
@*/
|
||||
Ox.crossesDateline = function(pointA, pointB) {
|
||||
return pointA.lng > pointB.lng;
|
||||
|
@ -53,6 +57,8 @@
|
|||
Ox.getBearing <f> Returns the bearing from one point to another
|
||||
> Ox.getBearing({lat: -45, lng: 0}, {lat: 45, lng: 0})
|
||||
0
|
||||
> Ox.getBearing({lat: 0, lng: -90}, {lat: 0, lng: 90})
|
||||
90
|
||||
@*/
|
||||
Ox.getBearing = function(pointA, pointB) {
|
||||
var pointA = rad(pointA),
|
||||
|
@ -209,6 +215,8 @@
|
|||
|
||||
/*@
|
||||
Ox.isPolar <f> Returns true if a given point is outside the bounds of a mercator projection
|
||||
> Ox.isPolar({lat: 90, lng: 0})
|
||||
true
|
||||
@*/
|
||||
Ox.isPolar = function(point) {
|
||||
return point.lat < Ox.MIN_LATITUDE || point.lat > Ox.MAX_LATITUDE;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Ox.parseEmailAddresses <f> Takes HTML and turns e-mail addresses into links
|
||||
@*/
|
||||
// fixme: no tests
|
||||
// fixme: shouldn't this be formatEmailAddresses?
|
||||
Ox.parseEmailAddresses = function(html) {
|
||||
return html.replace(
|
||||
/\b([0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6})\b/gi,
|
||||
|
@ -144,8 +145,8 @@ Ox.parseURL = (function() {
|
|||
/*@
|
||||
Ox.parseURLs <f> Takes HTML and turns URLs into links
|
||||
@*/
|
||||
// fixme: is parseURLs the right name?
|
||||
// fixme: no tests
|
||||
// fixme: shouldn't this be formatURLs?
|
||||
Ox.parseURLs = function(html) {
|
||||
return html.replace(
|
||||
/\b((https?:\/\/|www\.).+?)([\.,:;!\?\)\]]*?(\s|$))/gi,
|
||||
|
|
Loading…
Reference in a new issue