on master help sign in
Updates to get rid of closure compiler errors.
f508072evancz
core-js/Char.js−1
@@ -1,5 +1,4 @@
1
1
2−var Elm = Elm || {};
3Elm.Char = function() {
2Elm.Char = function() {
4 function isBetween(lo,hi) { return function(chr) {
3 function isBetween(lo,hi) { return function(chr) {
5 var c = chr.charCodeAt(0);
4 var c = chr.charCodeAt(0);
core-js/Graphics/Collage.js+6−5
@@ -122,14 +122,15 @@ function renderForms(redo,ctx,w,h,forms) {
122
122
123function collageForms(w,h,forms) {
123function collageForms(w,h,forms) {
124 var canvas = Render.newElement('canvas');
124 var canvas = Render.newElement('canvas');
125+ w = ~~w;
126+ h = ~~h;
125− canvas.style.width = (~~w) + 'px';
127+ canvas.style.width = w + 'px';
126− canvas.style.height = (~~h) + 'px';
128+ canvas.style.height = h + 'px';
127 canvas.style.display = "block";
129 canvas.style.display = "block";
128− canvas.width = ~~w;
130+ canvas.width = w;
129− canvas.height = ~~h;
131+ canvas.height = h;
130 if (canvas.getContext) {
132 if (canvas.getContext) {
131 var ctx = canvas.getContext('2d');
133 var ctx = canvas.getContext('2d');
132− var w = canvas.width, h = canvas.height;
133 function redo() { renderForms(this,ctx,w,h,forms); }
134 function redo() { renderForms(this,ctx,w,h,forms); }
134 renderForms(redo,ctx,w,h,forms);
135 renderForms(redo,ctx,w,h,forms);
135 return canvas;
136 return canvas;
core-js/Graphics/Color.js−1
@@ -1,4 +1,3 @@
1−var Elm = Elm || {};
2Elm.Color = function() {
1Elm.Color = function() {
3 function Color_0(a1) {
2 function Color_0(a1) {
4 return function(a2) {
3 return function(a2) {
core-js/Graphics/Element.js−1
@@ -1,4 +1,3 @@
1−var Elm = Elm || {};
2Elm.Graphics = function() {
1Elm.Graphics = function() {
3 var JS = Elm.JavaScript;
2 var JS = Elm.JavaScript;
4 var DLeft_0 = ["DLeft"];
3 var DLeft_0 = ["DLeft"];
core-js/Guid.js+2
@@ -1,4 +1,6 @@
1
1
2+Elm = {};
3+
2var Guid = function() {
4var Guid = function() {
3 var counter = 0;
5 var counter = 0;
4 var guid = function() { counter += 1; return counter; };
6 var guid = function() { counter += 1; return counter; };
core-js/List.js−1
@@ -1,4 +1,3 @@
1−var Elm = Elm || {};
2Elm.List = function() {
1Elm.List = function() {
3
2
4 var throwError = function(f) {
3 var throwError = function(f) {
core-js/Maybe.js−1
@@ -1,5 +1,4 @@
1
1
2−var Elm = Elm || {};
3Elm.Maybe = function() {
2Elm.Maybe = function() {
4 function consMaybe(x) { return function(xs) {
3 function consMaybe(x) { return function(xs) {
5 if (x[0] === "Just") return ["Cons", x[1], xs];
4 if (x[0] === "Just") return ["Cons", x[1], xs];
core-js/Prelude.js−1
@@ -5,7 +5,6 @@ Value.addListener(document, 'elm_redirect', function(e) {
5 if (e.value.length > 0) { window.location = e.value; }
5 if (e.value.length > 0) { window.location = e.value; }
6 });
6 });
7
7
8−var Elm = Elm || {};
9Elm.Prelude = function() {
8Elm.Prelude = function() {
10 var mod = function(x) { return function(y) {
9 var mod = function(x) { return function(y) {
11 var r = x % y;
10 var r = x % y;
core-js/Set.js+14−22
@@ -1,39 +1,31 @@
1
1
2−(function() {
3−
4−for(var i in Elm) { this[i] = Elm[i]; }
5Elm.Set=function(){
2Elm.Set=function(){
6− var hiddenVars=[];
7− for(var i in Elm.Prelude){
8− if (hiddenVars.indexOf(i) >= 0) continue;
9− this[i]=Elm.Prelude[i];}
10− var empty_0=Dict.empty;
3+ var empty_0=Elm.Dict.empty;
11− var remove_3=Dict.remove;
4+ var remove_3=Elm.Dict.remove;
12− var member_4=Dict.member;
5+ var member_4=Elm.Dict.member;
13− var union_5=Dict.union;
6+ var union_5=Elm.Dict.union;
14− var intersect_6=Dict.intersect;
7+ var intersect_6=Elm.Dict.intersect;
15− var diff_7=Dict.diff;
8+ var diff_7=Elm.Dict.diff;
16− var toList_8=Dict.keys;
9+ var toList_8=Elm.Dict.keys;
17− var fromList_9=List.foldl(function(k_15){
10+ var fromList_9=Elm.List.foldl(function(k_15){
18 return function(t_16){
11 return function(t_16){
19− return Dict.insert(k_15)(["Tuple0"])(t_16);};})(empty_0);
12+ return Elm.Dict.insert(k_15)(["Tuple0"])(t_16);};})(empty_0);
20 function singleton_1(k_13){
13 function singleton_1(k_13){
21− return Dict.singleton(k_13)(["Tuple0"]);};
14+ return Elm.Dict.singleton(k_13)(["Tuple0"]);};
22 function insert_2(k_14){
15 function insert_2(k_14){
23− return Dict.insert(k_14)(["Tuple0"]);};
16+ return Elm.Dict.insert(k_14)(["Tuple0"]);};
24 function foldl_10(f_17){
17 function foldl_10(f_17){
25− return Dict.foldl(function(k_18){
18+ return Elm.Dict.foldl(function(k_18){
26 return function(v_19){
19 return function(v_19){
27 return function(b_20){
20 return function(b_20){
28 return f_17(k_18)(b_20);};};});};
21 return f_17(k_18)(b_20);};};});};
29 function foldr_11(f_21){
22 function foldr_11(f_21){
30− return Dict.foldr(function(k_22){
23+ return Elm.Dict.foldr(function(k_22){
31 return function(v_23){
24 return function(v_23){
32 return function(b_24){
25 return function(b_24){
33 return f_21(k_22)(b_24);};};});};
26 return f_21(k_22)(b_24);};};});};
34 function map_12(f_25){
27 function map_12(f_25){
35 return function(t_26){
28 return function(t_26){
36 return function(x){
29 return function(x){
37− return fromList_9(List.map(f_25)(x));}(toList_8(t_26));};};
30+ return fromList_9(Elm.List.map(f_25)(x));}(toList_8(t_26));};};
38 return {empty:empty_0,singleton:singleton_1,insert:insert_2,remove:remove_3,member:member_4,union:union_5,intersect:intersect_6,diff:diff_7,toList:toList_8,fromList:fromList_9,foldl:foldl_10,foldr:foldr_11,map:map_12};}();
31 return {empty:empty_0,singleton:singleton_1,insert:insert_2,remove:remove_3,member:member_4,union:union_5,intersect:intersect_6,diff:diff_7,toList:toList_8,fromList:fromList_9,foldl:foldl_10,foldr:foldr_11,map:map_12};}();
39−}());
core-js/Text.js−1
@@ -1,5 +1,4 @@
1
1
2−var Elm = Elm || {};
3Elm.Text = function() {
2Elm.Text = function() {
4 function fromString(s) { return Value.toText(s); }
3 function fromString(s) { return Value.toText(s); }
5
4
core-js/Value.js+5−5
@@ -94,11 +94,11 @@ var Value = function(){
94 t.style.cssFloat = "left";
94 t.style.cssFloat = "left";
95
95
96 document.body.appendChild(t);
96 document.body.appendChild(t);
97− var cStyle = window.getComputedStyle(t);
97+ var cStyle = window.getComputedStyle(t,null);
98 var realW = cStyle.getPropertyValue("width").slice(0,-2) - 0;
98 var realW = cStyle.getPropertyValue("width").slice(0,-2) - 0;
99 var realH = cStyle.getPropertyValue("height").slice(0,-2) - 0;
99 var realH = cStyle.getPropertyValue("height").slice(0,-2) - 0;
100 document.body.removeChild(t);
100 document.body.removeChild(t);
101− delete t;
101+ //delete t;
102 return [Math.ceil(realW),Math.ceil(Math.max(h,realH))];
102 return [Math.ceil(realW),Math.ceil(Math.max(h,realH))];
103 }
103 }
104
104
@@ -113,7 +113,7 @@ var Value = function(){
113 var w = t.offsetWidth;
113 var w = t.offsetWidth;
114 var h = t.offsetHeight;
114 var h = t.offsetHeight;
115 document.body.removeChild(t);
115 document.body.removeChild(t);
116− delete t;
116+ //delete t;
117 return [w,h];
117 return [w,h];
118 }
118 }
119
119
@@ -127,11 +127,11 @@ var Value = function(){
127 document.body.appendChild(t);
127 document.body.appendChild(t);
128 var ow = t.offsetWidth;
128 var ow = t.offsetWidth;
129 var oh = t.offsetHeight;
129 var oh = t.offsetHeight;
130− var cStyle = window.getComputedStyle(t);
130+ var cStyle = window.getComputedStyle(t,null);
131 var w = cStyle.getPropertyValue("width").slice(0,-2) - 0;
131 var w = cStyle.getPropertyValue("width").slice(0,-2) - 0;
132 var h = cStyle.getPropertyValue("height").slice(0,-2) - 0;
132 var h = cStyle.getPropertyValue("height").slice(0,-2) - 0;
133 document.body.removeChild(t);
133 document.body.removeChild(t);
134− delete t;
134+ //delete t;
135 return [ow-w,oh-h];
135 return [ow-w,oh-h];
136 }
136 }
137
137
core-js/foreign/JSON.js−1
@@ -1,5 +1,4 @@
1
1
2−var Elm = Elm || {};
3var JSjson = JSON;
2var JSjson = JSON;
4Elm.JSON = function() {
3Elm.JSON = function() {
5 var JS = Elm.JavaScript;
4 var JS = Elm.JavaScript;
core-js/foreign/JavaScript.js−1
@@ -1,5 +1,4 @@
1
1
2−var Elm = Elm || {};
3Elm.JavaScript = function() {
2Elm.JavaScript = function() {
4 function castJSBoolToBool(b) { return b; }
3 function castJSBoolToBool(b) { return b; }
5 function castBoolToJSBool(b) { return b; }
4 function castBoolToJSBool(b) { return b; }
core-js/runtime/Signal.js−1
@@ -1,5 +1,4 @@
1
1
2−var Elm = Elm || {};
3Elm.Signal = function() {
2Elm.Signal = function() {
4 var send = function(node, timestep, changed) {
3 var send = function(node, timestep, changed) {
5 var kids = node.kids;
4 var kids = node.kids;