Merge pull request #702 from fs-webdev/master

Added small checks around code to make m2 sample work locally.
This commit is contained in:
Ian Gilman 2015-08-13 10:49:18 -07:00
commit 5a2733bbc1

View File

@ -464,18 +464,22 @@
var page = this.pages[this.pageIndex];
var box = page.getBounds();
this.highlight
.style('opacity', 1)
.attr("x", box.x)
.attr("width", box.width)
.attr("y", box.y)
.attr("height", box.height);
if (this.highlight) {
this.highlight
.style('opacity', 1)
.attr("x", box.x)
.attr("width", box.width)
.attr("y", box.y)
.attr("height", box.height);
}
},
// ----------
updateHover: function(pageIndex) {
if (pageIndex === -1 || this.mode !== 'thumbs') {
this.hover.style('opacity', 0);
if (this.hover) {
this.hover.style('opacity', 0);
}
this.$scrollCover.css({
'cursor': 'default'
});
@ -490,12 +494,14 @@
var page = this.pages[pageIndex];
var box = page.getBounds();
this.hover
.style('opacity', 0.3)
.attr("x", box.x)
.attr("width", box.width)
.attr("y", box.y)
.attr("height", box.height);
if (this.hover) {
this.hover
.style('opacity', 0.3)
.attr("x", box.x)
.attr("width", box.width)
.attr("y", box.y)
.attr("height", box.height);
}
},
// ----------