// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.canvas');
goog.require('cljs.core');
goog.require('lt.util.dom');
goog.require('lt.util.dom');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.context');
goog.require('lt.object');
goog.require('lt.object');
lt.objs.canvas.canvas_elem = (function canvas_elem(obj){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#canvas","div#canvas",1156573436)], null));var seq__10790_10796 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__10791_10797 = null;var count__10792_10798 = 0;var i__10793_10799 = 0;while(true){
if((i__10793_10799 < count__10792_10798))
{var vec__10794_10800 = cljs.core._nth.call(null,chunk__10791_10797,i__10793_10799);var ev__3326__auto___10801 = cljs.core.nth.call(null,vec__10794_10800,0,null);var func__3327__auto___10802 = cljs.core.nth.call(null,vec__10794_10800,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___10801,func__3327__auto___10802);
{
var G__10803 = seq__10790_10796;
var G__10804 = chunk__10791_10797;
var G__10805 = count__10792_10798;
var G__10806 = (i__10793_10799 + 1);
seq__10790_10796 = G__10803;
chunk__10791_10797 = G__10804;
count__10792_10798 = G__10805;
i__10793_10799 = G__10806;
continue;
}
} else
{var temp__4092__auto___10807 = cljs.core.seq.call(null,seq__10790_10796);if(temp__4092__auto___10807)
{var seq__10790_10808__$1 = temp__4092__auto___10807;if(cljs.core.chunked_seq_QMARK_.call(null,seq__10790_10808__$1))
{var c__4262__auto___10809 = cljs.core.chunk_first.call(null,seq__10790_10808__$1);{
var G__10810 = cljs.core.chunk_rest.call(null,seq__10790_10808__$1);
var G__10811 = c__4262__auto___10809;
var G__10812 = cljs.core.count.call(null,c__4262__auto___10809);
var G__10813 = 0;
seq__10790_10796 = G__10810;
chunk__10791_10797 = G__10811;
count__10792_10798 = G__10812;
i__10793_10799 = G__10813;
continue;
}
} else
{var vec__10795_10814 = cljs.core.first.call(null,seq__10790_10808__$1);var ev__3326__auto___10815 = cljs.core.nth.call(null,vec__10795_10814,0,null);var func__3327__auto___10816 = cljs.core.nth.call(null,vec__10795_10814,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___10815,func__3327__auto___10816);
{
var G__10817 = cljs.core.next.call(null,seq__10790_10808__$1);
var G__10818 = null;
var G__10819 = 0;
var G__10820 = 0;
seq__10790_10796 = G__10817;
chunk__10791_10797 = G__10818;
count__10792_10798 = G__10819;
i__10793_10799 = G__10820;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.canvas","canvas","lt.objs.canvas/canvas",4793027327),new cljs.core.Keyword(null,"init","init",1017141378),(function (obj){return lt.objs.canvas.canvas_elem.call(null,obj);
}));
lt.objs.canvas.canvas = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.canvas","canvas","lt.objs.canvas/canvas",4793027327));
lt.util.dom.append.call(null,lt.util.dom.$.call(null,"#wrapper"),lt.object.__GT_content.call(null,lt.objs.canvas.canvas));
/**
* @param {...*} var_args
*/
lt.objs.canvas.add_BANG_ = (function() { 
var add_BANG___delegate = function (obj,p__10821){var vec__10823 = p__10821;var position_QMARK_ = cljs.core.nth.call(null,vec__10823,0,null);lt.util.dom.append.call(null,lt.object.__GT_content.call(null,lt.objs.canvas.canvas),lt.object.__GT_content.call(null,obj));
return lt.object.raise.call(null,obj,new cljs.core.Keyword(null,"show","show",1017433711));
};
var add_BANG_ = function (obj,var_args){
var p__10821 = null;if (arguments.length > 1) {
  p__10821 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return add_BANG___delegate.call(this,obj,p__10821);};
add_BANG_.cljs$lang$maxFixedArity = 1;
add_BANG_.cljs$lang$applyTo = (function (arglist__10824){
var obj = cljs.core.first(arglist__10824);
var p__10821 = cljs.core.rest(arglist__10824);
return add_BANG___delegate(obj,p__10821);
});
add_BANG_.cljs$core$IFn$_invoke$arity$variadic = add_BANG___delegate;
return add_BANG_;
})()
;
lt.objs.canvas.__BEH__append_canvas = (function __BEH__append_canvas(app){lt.util.dom.css.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"#loader","#loader",914242920)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"opacity","opacity",4041665405),0], null));
return lt.util.dom.css.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"#wrapper","#wrapper",3478231682)),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"opacity","opacity",4041665405),1], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.canvas","append-canvas","lt.objs.canvas/append-canvas",4118451466),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.canvas.__BEH__append_canvas,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
