diff --git a/comicgen.js b/comicgen.js
index ffb6c1d..6853eb8 100644
--- a/comicgen.js
+++ b/comicgen.js
@@ -1,10 +1,13 @@
var d = document;
var cg = {};
-var c = $('#c')[0];
+var w = window.innerWidth * 0.8;
+var h = window.innerHeight * 0.8;;
+console.log('size : ' + w + ' x ' + h);
+var canvas = $('#c');
+canvas.attr('width',w).attr('height',h);
+var c = canvas[0];
var ctx = c.getContext('2d');
var scene = new RB.Scene(c);
-var w = c.width;
-var h = c.height;
var fontFamily = "Domestic Manners, Arial, helvetica, sans serif";
var pop = new Audio('pop.ogg');
var currentObj = null;
@@ -68,9 +71,10 @@ d.onmousewheel = function(mw){
};
cg.hoverdiv = function(e,divid){
-
- var left = e.clientX + "px";
- var top = e.clientY + "px";
+ var x = e.clientX + 25;
+ var y = e.clientY ;
+ var left = x + "px";
+ var top = y + "px";
var div = document.getElementById(divid);
@@ -81,21 +85,23 @@ cg.hoverdiv = function(e,divid){
return false;
}
cg.sourceSwap = function (e) {
- var img_mini = $(this);
- var img_id = parseInt(img_mini.data('src-id'));
+ var div_mini = $(this);
+ console.log(div_mini)
+ var img_id = parseInt(div_mini.data('src-id'));
var img_url = toonUrls[img_id];
- console.log(img_url)
$("#bigImg").attr('src','toons/' + img_url);
cg.hoverdiv(e,"focusImg")
}
cg.buildMinis = function(){
var buffer = '';
+ var divString = "