var img = this.loadImage(src, width, height, type, callback);
return $(img).get(0).outerHTML;
},
+ getThumbImage: function (page, div) {
+ if (div == undefined) {
+ var div = $('<div />');
+ }
+ var h = this.fluidbook.datas.thumbHeight;
+ var s = Math.floor(page / 100);
+ var row = Math.floor((page - 1) / 10);
+ var col = (page - 1) % 10;
+ if (col < 0) {
+ col += 10;
+ }
+ var left = col * 100;
+ var top = row * h;
+ $(div).css({
+ backgroundImage: 'url("data/thumbnails/s' + s + '.jpg")',
+ backgroundPositionX: -left,
+ backgroundPositionY: -top
+ });
+ return div;
+ },
loadImage: function (src, width, height, type, callback) {
var img = new Image();
var $this = this;