Skip to content

Commit

Permalink
Merge pull request #825 from open-data-rescue/fix-ff-zoom-issue
Browse files Browse the repository at this point in the history
FF css changes for zoom
  • Loading branch information
balen authored Aug 30, 2024
2 parents 9d06414 + 9de2da3 commit 02c82e3
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions app/views/shared/_transcriber_app.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,20 @@

var zoom = (percent ? (value / 100) : value);
if (zoom > 0.1) {
this.zoomContainer.find(".annotated_page").css({
zoom : zoom,
// handle zoom css for firefox
'-moz-transform' : ('scale(' + zoom + ')'),
'-moz-transform-origin' : 'left top'
});
const browser = Bowser.getParser(window.navigator.userAgent);
// console.debug("****** browser IS", browser.getEngineName());
if (browser.getEngineName() == 'Gecko') {
// If the agent is FF then we need to use the moz-transform
// AND not put in the zoom
this.zoomContainer.find(".annotated_page").css({
'-moz-transform' : ('scale(' + zoom + ')'),
'-moz-transform-origin' : 'top left'
});
} else {
this.zoomContainer.find(".annotated_page").css({
zoom : zoom
});
}
this.currentZoom = zoom;
this.updateZoomLevel();

Expand Down

0 comments on commit 02c82e3

Please sign in to comment.