Commit eed03aad authored by Julia Radzhabova's avatar Julia Radzhabova

Fix Bug 35345.

parent c57a7606
......@@ -551,7 +551,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
......@@ -603,7 +603,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -624,7 +624,7 @@ define([
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -1048,14 +1048,14 @@ define([
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.00001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.00001 || check_value ||
(this._state.StrokeWidth===null || w===null)&&(this._state.StrokeWidth!==w)) {
this._state.StrokeWidth = w;
if (w!==null) w = this._mm2pt(w);
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
if ( w<item.attributes.value+0.01 && w>item.attributes.value-0.01) {
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
return true;
}
});
......
......@@ -417,7 +417,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
......@@ -469,7 +469,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -490,7 +490,7 @@ define([
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -721,14 +721,14 @@ define([
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.00001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.00001 || check_value ||
(this._state.StrokeWidth===null || w===null)&&(this._state.StrokeWidth!==w)) {
this._state.StrokeWidth = w;
if (w!==null) w = this._mm2pt(w);
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
if ( w<item.attributes.value+0.01 && w>item.attributes.value-0.01) {
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
return true;
}
});
......
......@@ -531,7 +531,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
......@@ -582,7 +582,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -602,7 +602,7 @@ define([
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -942,14 +942,14 @@ define([
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.00001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.00001 || check_value ||
(this._state.StrokeWidth===null || w===null)&&(this._state.StrokeWidth!==w)) {
this._state.StrokeWidth = w;
if (w!==null) w = this._mm2pt(w);
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
if ( w<item.attributes.value+0.01 && w>item.attributes.value-0.01) {
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
return true;
}
});
......
......@@ -538,7 +538,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
......@@ -590,7 +590,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -611,7 +611,7 @@ define([
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -920,14 +920,14 @@ define([
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.00001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.00001 || check_value ||
(this._state.StrokeWidth===null || w===null)&&(this._state.StrokeWidth!==w)) {
this._state.StrokeWidth = w;
if (w!==null) w = this._mm2pt(w);
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
if ( w<item.attributes.value+0.01 && w>item.attributes.value-0.01) {
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
return true;
}
});
......
......@@ -547,7 +547,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
......@@ -599,7 +599,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -620,7 +620,7 @@ define([
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -966,14 +966,14 @@ define([
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.asc_getWidth();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.00001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.00001 || check_value ||
(this._state.StrokeWidth===null || w===null)&&(this._state.StrokeWidth!==w)) {
this._state.StrokeWidth = w;
if (w!==null) w = this._mm2pt(w);
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
if ( w<item.attributes.value+0.01 && w>item.attributes.value-0.01) {
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
return true;
}
});
......
......@@ -539,7 +539,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
} else {
......@@ -591,7 +591,7 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -612,7 +612,7 @@ define([
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
if (this.BorderSize<0.00001) {
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
......@@ -924,14 +924,14 @@ define([
if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.asc_getWidth();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.00001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.00001 || check_value ||
(this._state.StrokeWidth===null || w===null)&&(this._state.StrokeWidth!==w)) {
this._state.StrokeWidth = w;
if (w!==null) w = this._mm2pt(w);
var _selectedItem = (w===null) ? w : _.find(this.cmbBorderSize.store.models, function(item) {
if ( w<item.attributes.value+0.01 && w>item.attributes.value-0.01) {
if ( w<item.attributes.value+0.00001 && w>item.attributes.value-0.00001) {
return true;
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment