Edit my bug
This commit is contained in:
parent
8a0ade63f5
commit
8c8a562637
|
@ -381,8 +381,8 @@ var metrics = new(function() {
|
||||||
|
|
||||||
fnRecalcToMM: function(value, unit) {
|
fnRecalcToMM: function(value, unit) {
|
||||||
// value in pt/cm/inch. need to convert to mm
|
// value in pt/cm/inch. need to convert to mm
|
||||||
if(unit==undefined)
|
if(unit===undefined)
|
||||||
unrt=me.currentMetric
|
unit=me.currentMetric;
|
||||||
if (value!==null && value!==undefined) {
|
if (value!==null && value!==undefined) {
|
||||||
switch (unit) {
|
switch (unit) {
|
||||||
case me.c_MetricUnits.cm:
|
case me.c_MetricUnits.cm:
|
||||||
|
@ -398,8 +398,8 @@ var metrics = new(function() {
|
||||||
|
|
||||||
fnRecalcFromMM: function(value, unit) {
|
fnRecalcFromMM: function(value, unit) {
|
||||||
// value in mm. need to convert to pt/cm/inch
|
// value in mm. need to convert to pt/cm/inch
|
||||||
if(unit==undefined)
|
if(unit===undefined)
|
||||||
unrt=me.currentMetric
|
unit=me.currentMetric;
|
||||||
switch (unit) {
|
switch (unit) {
|
||||||
case me.c_MetricUnits.cm:
|
case me.c_MetricUnits.cm:
|
||||||
return parseFloat((value/10.).toFixed(4));
|
return parseFloat((value/10.).toFixed(4));
|
||||||
|
|
|
@ -488,6 +488,7 @@ define([
|
||||||
(this._state.LeftIndent===null || left===null)&&(this._state.LeftIndent!==left)) {
|
(this._state.LeftIndent===null || left===null)&&(this._state.LeftIndent!==left)) {
|
||||||
this.numIndentsLeft.setValue(left!==null ? Common.Utils.Metric.fnRecalcFromMM(left) : '', true);
|
this.numIndentsLeft.setValue(left!==null ? Common.Utils.Metric.fnRecalcFromMM(left) : '', true);
|
||||||
this._state.LeftIndent=left;
|
this._state.LeftIndent=left;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( Math.abs(this._state.FirstLine-first)>0.001 ||
|
if ( Math.abs(this._state.FirstLine-first)>0.001 ||
|
||||||
|
@ -554,12 +555,14 @@ define([
|
||||||
for (var i=0; i<this.spinners.length; i++) {
|
for (var i=0; i<this.spinners.length; i++) {
|
||||||
var spinner = this.spinners[i];
|
var spinner = this.spinners[i];
|
||||||
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
|
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
|
||||||
if(spinner.el.id == 'paragraph-spin-spacing-before' || spinner.el.id == 'paragraph-spin-spacing-after')
|
|
||||||
spinner.setDefaultUnit( Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
|
|
||||||
if (spinner.el.id == 'paragraphadv-spin-position' )
|
if (spinner.el.id == 'paragraphadv-spin-position' )
|
||||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||||
else if( spinner.el.id == 'paragraph-spin-spacing-before' || spinner.el.id == 'paragraph-spin-spacing-after')
|
else if( spinner.el.id == 'paragraph-spin-spacing-before' || spinner.el.id == 'paragraph-spin-spacing-after'){
|
||||||
|
|
||||||
spinner.setStep(1);
|
spinner.setStep(1);
|
||||||
|
spinner.setDefaultUnit( Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue