diff --git a/comicgen.js b/comicgen.js
index ffb6c1d..7ddebab 100644
--- a/comicgen.js
+++ b/comicgen.js
@@ -1,13 +1,17 @@
var d = document;
var cg = {};
-var c = $('#c')[0];
+var w = parseInt(window.innerWidth * 0.8);
+var h = parseInt(window.innerHeight * 0.8);
+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;
+$('#newWidth').val(w);
+$('#newHeight').val(h);
scene.add( scene.rect(w, h, 'white') );
scene.update();
@@ -68,9 +72,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 +86,22 @@ 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);
+ 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 = "