// 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__7156_7162 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__7157_7163 = null;var count__7158_7164 = 0;var i__7159_7165 = 0;while(true){
if((i__7159_7165 < count__7158_7164))
{var vec__7160_7166 = cljs.core._nth.call(null,chunk__7157_7163,i__7159_7165);var ev__3326__auto___7167 = cljs.core.nth.call(null,vec__7160_7166,0,null);var func__3327__auto___7168 = cljs.core.nth.call(null,vec__7160_7166,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7167,func__3327__auto___7168);
{
var G__7169 = seq__7156_7162;
var G__7170 = chunk__7157_7163;
var G__7171 = count__7158_7164;
var G__7172 = (i__7159_7165 + 1);
seq__7156_7162 = G__7169;
chunk__7157_7163 = G__7170;
count__7158_7164 = G__7171;
i__7159_7165 = G__7172;
continue;
}
} else
{var temp__4092__auto___7173 = cljs.core.seq.call(null,seq__7156_7162);if(temp__4092__auto___7173)
{var seq__7156_7174__$1 = temp__4092__auto___7173;if(cljs.core.chunked_seq_QMARK_.call(null,seq__7156_7174__$1))
{var c__4262__auto___7175 = cljs.core.chunk_first.call(null,seq__7156_7174__$1);{
var G__7176 = cljs.core.chunk_rest.call(null,seq__7156_7174__$1);
var G__7177 = c__4262__auto___7175;
var G__7178 = cljs.core.count.call(null,c__4262__auto___7175);
var G__7179 = 0;
seq__7156_7162 = G__7176;
chunk__7157_7163 = G__7177;
count__7158_7164 = G__7178;
i__7159_7165 = G__7179;
continue;
}
} else
{var vec__7161_7180 = cljs.core.first.call(null,seq__7156_7174__$1);var ev__3326__auto___7181 = cljs.core.nth.call(null,vec__7161_7180,0,null);var func__3327__auto___7182 = cljs.core.nth.call(null,vec__7161_7180,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___7181,func__3327__auto___7182);
{
var G__7183 = cljs.core.next.call(null,seq__7156_7174__$1);
var G__7184 = null;
var G__7185 = 0;
var G__7186 = 0;
seq__7156_7162 = G__7183;
chunk__7157_7163 = G__7184;
count__7158_7164 = G__7185;
i__7159_7165 = G__7186;
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__7187){var vec__7189 = p__7187;var position_QMARK_ = cljs.core.nth.call(null,vec__7189,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__7187 = null;if (arguments.length > 1) {
  p__7187 = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return add_BANG___delegate.call(this,obj,p__7187);};
add_BANG_.cljs$lang$maxFixedArity = 1;
add_BANG_.cljs$lang$applyTo = (function (arglist__7190){
var obj = cljs.core.first(arglist__7190);
var p__7187 = cljs.core.rest(arglist__7190);
return add_BANG___delegate(obj,p__7187);
});
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));
