elm/libraries/Native/Graphics/Collage.js
Evan Czaplicki dcbe2fc245 Change the format of module instantiation
Currently, it's only possible to create modules at the leafs of the
namespace structure. This CL lifts that restriction.

Get rid of "use strict" in many cases.
2013-09-30 00:44:31 -07:00

22 lines
No EOL
623 B
JavaScript

Elm.Native.Graphics.Collage = {};
Elm.Native.Graphics.Collage.make = function(elm) {
elm.Native = elm.Native || {};
elm.Native.Graphics = elm.Native.Graphics || {};
if (elm.Native.Graphics.Collage) return elm.Native.Graphics.Collage;
var newElement = Elm.Graphics.Element.make(elm).newElement;
var C = ElmRuntime.use(ElmRuntime.Render.Collage);
function collage(w,h,forms) {
return A3(newElement, w, h, {
ctor: 'Custom',
type: 'Collage',
render: C.render,
update: C.update,
model: {w:w, h:h, forms:forms}
});
}
return elm.Native.Graphics.Collage = { collage:F3(collage) };
};