Number formatting error
-
I’m using a dutch Locale, and because numbers are formatted with a comma instead of a floating point (I don’t know why). It goes all wrong, I can’t crop anymore in the back end. Hopefully you guys can fix this.
The temp solution I found:
setTimeout(function() { $('#jcrop_target').Jcrop({ onChange: showPreview, onSelect: showPreview, minSize: [<?php echo $minWidth; ?>, <?php echo $minHeight; ?>], maxSize: [<?php echo $previewWidth; ?>, <?php echo $previewHeight; ?>], <?php if ( isset( $metaData['micSelectedArea'][$editedSize] ) ) { ?> setSelect: [<?php echo number_format(max(0, $metaData['micSelectedArea'][$editedSize]['x']), 2, '.', '') ?>, <?php echo number_format(max(0, $metaData['micSelectedArea'][$editedSize]['y']), 2, '.', '') ?>, <?php echo number_format(max(0, $metaData['micSelectedArea'][$editedSize]['x']) + $metaData['micSelectedArea'][$editedSize]['w'], 2, '.', ''); ?>, <?php echo number_format(max(0, $metaData['micSelectedArea'][$editedSize]['y']) + $metaData['micSelectedArea'][$editedSize]['h'], 2, '.', ''); ?>], <?php }else { ?> setSelect: [<?php echo number_format(max(0, ($previewWidth - ($previewHeight * $aspectRatio)) / 2), 2, '.', '') ?>, <?php echo number_format(max(0, ($previewHeight - ($previewWidth / $aspectRatio)) / 2), 2, '.', '') ?>, <?php echo number_format($previewWidth * $aspectRatio, 2, '.', ''); ?>, <?php echo number_format($previewHeight, 2, '.', ''); ?>], <?php }?> aspectRatio: <?php echo number_format($aspectRatio, 2, '.', '') ?>, }, function() { jcrop_api = this; }); }, 300);
Is number formatting the outcome in ManualImageCropEditorWindow.php starting from line 248.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Number formatting error’ is closed to new replies.