Skip to content

Commit

Permalink
feat(ui): prevent export window from overflowing
Browse files Browse the repository at this point in the history
On subsequent openings, map export window might have elements that are too wide triggering a horizontal scrollbar to appear.

Signed-off-by: Aleksuei Riabtsev <aleksuei.riabtsev@ec.gc.ca>
  • Loading branch information
AleksueiR committed Jul 6, 2015
1 parent 6e6348a commit f0abf54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/RAMP/Modules/imageExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ define([
.set(mapExportStretcher, { clearProps: "all" })
;

// resize the notice container as it might be too large from the previous map export
mapExportNoticeContainer.css({ width: mapExportStretcher.width() - 2 });

promise.then(
function (event) {
var localCanvas,
Expand Down Expand Up @@ -234,8 +237,6 @@ define([
.attr('aria-disabled', false)
.on('click', generateExportImage);

mapExportNoticeContainer.css({ width: mapExportStretcher.width() - 2 });

// disable for IE9 and IE10
// IE10 does not support CORS for canvases: http://stackoverflow.com/questions/18112047/canvas-todataurl-working-in-all-browsers-except-ie10; http://stackoverflow.com/questions/16956295/ie10-and-cross-origin-resource-sharing-cors-issues-with-image-canvas
if (RAMP.flags.brokenWebBrowser || RAMP.flags.ie10client) {
Expand Down

0 comments on commit f0abf54

Please sign in to comment.