Skip to content

Commit

Permalink
Merge pull request #5024 from camptocamp/GSGMF-1003
Browse files Browse the repository at this point in the history
Check the input value with 'string' instead of 'number'
  • Loading branch information
fredj authored Jul 18, 2019
2 parents cf9d5be + 8bd21bd commit f2ec13f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions contribs/gmf/src/print/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,18 +538,12 @@ export class PrintController {
*/
this.rotationInput_ = $element.find('.gmf-print-rotation-input');

this.rotationInput_.on('input', (event) => {
// 'change' event listening is a workaround for IE11
this.rotationInput_.on('input change', (event) => {
const rotation = $(event.target).val();
if (typeof rotation == 'number') {
this.setRotation(rotation);
}
});
// Workaround for IE11
this.rotationInput_.on('change', (event) => {
const rotation = $(event.target).val();
if (typeof rotation == 'number') {
this.setRotation(rotation);
}
if (typeof rotation == 'string') {
this.setRotation(parseFloat(rotation));
}
});

/**
Expand Down

0 comments on commit f2ec13f

Please sign in to comment.