Added literallycanvas and react libraries.
[openemr.git] / library / js / literallycanvas / js / reactGUI / init.js
blob680117611db994d9650a5645d7f8e2177da415ed
1 // Generated by CoffeeScript 1.10.0
2 var Options, Picker, React, createToolButton, init;
4 React = require('./React-shim');
6 createToolButton = require('./createToolButton');
8 Options = React.createFactory(require('./Options'));
10 Picker = React.createFactory(require('./Picker'));
12 init = function(pickerElement, optionsElement, lc, tools, imageURLPrefix) {
13   var toolButtonComponents;
14   toolButtonComponents = tools.map(function(ToolClass) {
15     var toolInstance;
16     toolInstance = new ToolClass(lc);
17     return createToolButton({
18       displayName: toolInstance.name,
19       imageName: toolInstance.iconName,
20       getTool: function() {
21         return toolInstance;
22       }
23     });
24   });
25   React.render(Picker({
26     lc: lc,
27     toolButtonComponents: toolButtonComponents,
28     imageURLPrefix: imageURLPrefix
29   }), pickerElement);
30   return React.render(Options({
31     lc: lc,
32     imageURLPrefix: imageURLPrefix
33   }), optionsElement);
36 module.exports = init;