-function FluidbookBackground(fluidbook) {\r
- this.fluidbook = fluidbook;\r
- this.hasLinks = false;\r
- this.init();\r
-}\r
-\r
-FluidbookBackground.prototype = {\r
- init: function() {\r
- if (this.fluidbook.datas.links.background != undefined\r
- && this.fluidbook.datas.repeat != Fluidbook.REPEAT\r
- && this.fluidbook.datas.repeat != Fluidbook.STRETCH\r
- && this.fluidbook.datas.links.background != '') {\r
- $("#background").prepend('<div class="links">' + this.fluidbook.datas.links.background + '</div>');\r
- hasLinks = true;\r
- }\r
- },\r
- resize: function(w, h) {\r
- if (!this.hasLinks) {\r
- return;\r
- }\r
-\r
- var left, top, iw, ih;\r
- if (this.fluidbook.datas.repeat == Fluidbook.NONE) {\r
- iw = this.fluidbook.datas.backgroundImageDimensions.width;\r
- ih = this.fluidbook.datas.backgroundImageDimensions.height;\r
- }\r
-\r
- if (this.fluidbook.datas.backgroundHAlign == Fluidbook.LEFT) {\r
- left = 0\r
- } else if (this.fluidbook.datas.backgroundHAlign == Fluidbook.RIGHT) {\r
- left = w - iw;\r
- } else if (this.fluidbook.datas.backgroundHAlign == Fluidbook.CENTER) {\r
- left = (w - iw) / 2;\r
- }\r
-\r
-\r
- if (this.fluidbook.datas.backgroundVAlign == Fluidbook.TOP) {\r
- top = 0\r
- } else if (this.fluidbook.datas.backgroundVAlign == Fluidbook.BOTTOM) {\r
- top = h - ih;\r
- } else if (this.fluidbook.datas.backgroundVAlign == Fluidbook.MIDDLE) {\r
- top = (h - ih) / 2;\r
- }\r
-\r
- $("#background .links").css({\r
- top: top,\r
- left: left\r
- });\r
- }\r
-};\r
-\r
+function FluidbookBackground(fluidbook) {
+ this.fluidbook = fluidbook;
+ this.hasLinks = false;
+ this.init();
+}
+
+FluidbookBackground.prototype = {
+ init: function() {
+ if (this.fluidbook.datas.links.background != undefined
+ && this.fluidbook.datas.repeat != Fluidbook.REPEAT
+ && this.fluidbook.datas.repeat != Fluidbook.STRETCH
+ && this.fluidbook.datas.links.background != ''
+ && this.fluidbook.datas.mobileIgnoreBackgroundLinks === false) {
+ $("#background").prepend('<div class="links">' + this.fluidbook.datas.links.background + '</div>');
+ hasLinks = true;
+ }
+ },
+ resize: function(w, h) {
+ if (!this.hasLinks) {
+ return;
+ }
+
+ var left, top, iw, ih;
+ if (this.fluidbook.datas.repeat == Fluidbook.NONE) {
+ iw = this.fluidbook.datas.backgroundImageDimensions.width;
+ ih = this.fluidbook.datas.backgroundImageDimensions.height;
+ }
+
+ if (this.fluidbook.datas.backgroundHAlign == Fluidbook.LEFT) {
+ left = 0
+ } else if (this.fluidbook.datas.backgroundHAlign == Fluidbook.RIGHT) {
+ left = w - iw;
+ } else if (this.fluidbook.datas.backgroundHAlign == Fluidbook.CENTER) {
+ left = (w - iw) / 2;
+ }
+
+
+ if (this.fluidbook.datas.backgroundVAlign == Fluidbook.TOP) {
+ top = 0
+ } else if (this.fluidbook.datas.backgroundVAlign == Fluidbook.BOTTOM) {
+ top = h - ih;
+ } else if (this.fluidbook.datas.backgroundVAlign == Fluidbook.MIDDLE) {
+ top = (h - ih) / 2;
+ }
+
+ $("#background .links").css({
+ top: top,
+ left: left
+ });
+ }
+};
+