// scroll offset completely off.
img.style.display = 'none';
setTimeout(function() {
+ img.style.display = null; // Must be done before position_image(), for measurement.
position_image(img, backend_width, backend_height, offset, false);
- img.style.display = null;
}, 1);
}
}
// scroll offset completely off.
box.style.display = 'none';
setTimeout(function() {
+ box.style.display = null; // Must be done before position_image(), for measurement.
position_image(box, backend_width, backend_height, offset, true);
- box.style.display = null;
}, 1);
}
}
img.style.height = "24px";
img.style.width = null;
img.style.whiteSpace = 'nowrap';
- if (offset == 0) {
- // Hide the box if there's no room for all the text.
- img.style.opacity = (img.clientWidth < width / dpr + 10) ? null : 0.0;
- }
+ // Hide the box if there's no room for all the text.
+ img.style.opacity = (img.clientWidth < width / dpr + 10) ? null : 0.0;
img.style.width = (width / dpr) + "px";
} else {
img.style.top = (top / dpr) + "px";