fixed IE7 and IE8 script loading

pull/1/merge
javi 11 years ago
parent d99c5d6c14
commit f3fd24583d

@ -4,4 +4,10 @@ var assert = {
message = message || ''; message = message || '';
if(!value) throw new Error("assertion failed", message); if(!value) throw new Error("assertion failed", message);
} }
};
if (navigator.userAgent.indexOf('MSIE 8.0') !== -1 || navigator.userAgent.indexOf('MSIE 7.0') !== -1) {
Object.defineProperty = function(o, p, fn) { o[p] = fn.value; };
} }

@ -1,4 +1,3 @@
var carto, tree, _;
if (typeof(exports) !== 'undefined') { if (typeof(exports) !== 'undefined') {
carto = exports; carto = exports;
@ -8,6 +7,7 @@ if (typeof(exports) !== 'undefined') {
if (typeof(window.carto) === 'undefined') { window.carto = {}; } if (typeof(window.carto) === 'undefined') { window.carto = {}; }
carto = window.carto; carto = window.carto;
tree = window.carto.tree = {}; tree = window.carto.tree = {};
_ = window._;
} }
// carto.js - parser // carto.js - parser
@ -624,7 +624,7 @@ carto.Parser = function Parser(env) {
var e, elements = []; var e, elements = [];
var f, filters = new tree.Filterset(); var f, filters = new tree.Filterset();
var z, zoom = tree.Zoom.all; var z, zoom = tree.Zoom.all;
var fo, frame_offset = tree.FrameOffset.null; var fo, frame_offset = tree.FrameOffset.none;
var segments = 0, conditions = 0; var segments = 0, conditions = 0;
while ( while (

@ -23,5 +23,5 @@ tree.FrameOffset = function(op, value, index) {
}; };
tree.FrameOffset.max = 32; tree.FrameOffset.max = 32;
tree.FrameOffset.null = 0; tree.FrameOffset.none = 0;

Loading…
Cancel
Save