Revert changes

This commit is contained in:
Julia Radzhabova 2022-10-04 18:54:24 +03:00
parent 70540b1eb5
commit 68fa3649fb

View file

@ -411,11 +411,10 @@ var metrics = new(function() {
return me.defaultMetric;
},
fnRecalcToMM: function(value, fromMetric) {
fnRecalcToMM: function(value) {
// value in pt/cm/inch. need to convert to mm
var metric = (fromMetric!==undefined) ? fromMetric : me.currentMetric;
if (value!==null && value!==undefined) {
switch (metric) {
switch (me.currentMetric) {
case me.c_MetricUnits.cm:
return value * 10;
case me.c_MetricUnits.pt:
@ -427,10 +426,9 @@ var metrics = new(function() {
return value;
},
fnRecalcFromMM: function(value, toMetric) {
fnRecalcFromMM: function(value) {
// value in mm. need to convert to pt/cm/inch
var metric = (toMetric!==undefined) ? toMetric : me.currentMetric;
switch (metric) {
switch (me.currentMetric) {
case me.c_MetricUnits.cm:
return parseFloat((value/10.).toFixed(4));
case me.c_MetricUnits.pt: