From 48e5348bde6ce84f13f8633a700cf5607640634d Mon Sep 17 00:00:00 2001 From: Bala Clark Date: Fri, 2 Sep 2011 10:33:49 +0200 Subject: [PATCH] removed click anywhere navigation --- lib/ComicBook.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/lib/ComicBook.js b/lib/ComicBook.js index 4013597..dae45d9 100755 --- a/lib/ComicBook.js +++ b/lib/ComicBook.js @@ -119,29 +119,6 @@ function ComicBook(id, srcs, opts) { location.hash = pageNo; } - /** - * Figure out the cursor position relative to the canvas. - * - * Thanks to: Mark Pilgrim & http://diveintohtml5.org/canvas.html - */ - function getCursorPosition(e) { - - var x; // horizontal cursor position - - // check if page relative positions exist, if not figure them out - if (e.pageX) { - x = e.pageX; - } else { - x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; - } - - // make the position relative to the canvas - x -= canvas.offsetLeft; - - // check if the user clicked on the left or right side - return (x <= canvas.width / 2) ? 'left' : 'right'; - } - /** * Setup the canvas element for use throughout the class. * @@ -708,7 +685,7 @@ function ComicBook(id, srcs, opts) { switch (e.type) { case "click": - side = getCursorPosition(e); + ComicBook.prototype.toggleToolbar(); break; case "keydown":