mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Added small checks around code to make m2 sample work locally.
This commit is contained in:
parent
1aacf69e76
commit
9e142313d6
@ -464,18 +464,22 @@
|
|||||||
var page = this.pages[this.pageIndex];
|
var page = this.pages[this.pageIndex];
|
||||||
var box = page.getBounds();
|
var box = page.getBounds();
|
||||||
|
|
||||||
this.highlight
|
if (this.highlight) {
|
||||||
.style('opacity', 1)
|
this.highlight
|
||||||
.attr("x", box.x)
|
.style('opacity', 1)
|
||||||
.attr("width", box.width)
|
.attr("x", box.x)
|
||||||
.attr("y", box.y)
|
.attr("width", box.width)
|
||||||
.attr("height", box.height);
|
.attr("y", box.y)
|
||||||
|
.attr("height", box.height);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
updateHover: function(pageIndex) {
|
updateHover: function(pageIndex) {
|
||||||
if (pageIndex === -1 || this.mode !== 'thumbs') {
|
if (pageIndex === -1 || this.mode !== 'thumbs') {
|
||||||
this.hover.style('opacity', 0);
|
if (this.hover) {
|
||||||
|
this.hover.style('opacity', 0);
|
||||||
|
}
|
||||||
this.$scrollCover.css({
|
this.$scrollCover.css({
|
||||||
'cursor': 'default'
|
'cursor': 'default'
|
||||||
});
|
});
|
||||||
@ -490,12 +494,14 @@
|
|||||||
var page = this.pages[pageIndex];
|
var page = this.pages[pageIndex];
|
||||||
var box = page.getBounds();
|
var box = page.getBounds();
|
||||||
|
|
||||||
this.hover
|
if (this.hover) {
|
||||||
.style('opacity', 0.3)
|
this.hover
|
||||||
.attr("x", box.x)
|
.style('opacity', 0.3)
|
||||||
.attr("width", box.width)
|
.attr("x", box.x)
|
||||||
.attr("y", box.y)
|
.attr("width", box.width)
|
||||||
.attr("height", box.height);
|
.attr("y", box.y)
|
||||||
|
.attr("height", box.height);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
|
Loading…
Reference in New Issue
Block a user