[DE][PE][SSE] Fix gradient position change
This commit is contained in:
parent
0d39db4b41
commit
fcd12ad242
|
@ -513,6 +513,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1856,7 +1857,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
|
@ -1872,6 +1876,12 @@ define([
|
|||
props.asc_putFill(fill);
|
||||
this.imgprops.put_ShapeProperties(props);
|
||||
this.api.ImgApply(this.imgprops);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -378,6 +378,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1190,7 +1191,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
|
@ -1206,6 +1210,12 @@ define([
|
|||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ImgApply(this.imgprops);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -494,6 +494,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1728,7 +1729,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
|
@ -1743,6 +1747,12 @@ define([
|
|||
fill.get_fill().put_positions(arr);
|
||||
props.put_fill(fill);
|
||||
this.api.ShapeApply(props);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -595,6 +595,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1528,7 +1529,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.CAscSlideProps();
|
||||
|
@ -1543,6 +1547,12 @@ define([
|
|||
fill.get_fill().put_positions(arr);
|
||||
props.put_background(fill);
|
||||
this.api.SetSlideProps(props);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -498,6 +498,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1621,7 +1622,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
|
@ -1637,6 +1641,12 @@ define([
|
|||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ShapeApply(this.shapeprops);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1111,6 +1111,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue) {
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1212,7 +1213,10 @@ define([
|
|||
|
||||
onPositionChange: function(btn) {
|
||||
var me = this,
|
||||
pos = btn.getNumberValue();
|
||||
pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
if (this.gradient == null) {
|
||||
|
@ -1230,6 +1234,12 @@ define([
|
|||
|
||||
this.fill.asc_setGradientFill(this.gradient);
|
||||
this.api.asc_setCellFill(this.fill);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -509,6 +509,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1758,7 +1759,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
|
@ -1774,6 +1778,12 @@ define([
|
|||
props.asc_putFill(fill);
|
||||
this.imgprops.asc_putShapeProperties(props);
|
||||
this.api.asc_setGraphicObjectProps(this.imgprops);
|
||||
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -499,6 +499,7 @@ define([
|
|||
|
||||
onGradientChange: function(slider, newValue, oldValue){
|
||||
this.GradColor.values = slider.getValues();
|
||||
this.spnGradPosition.setValue(this.GradColor.values[this.GradColor.currentIdx], true);
|
||||
this._sliderChanged = true;
|
||||
if (this.api && !this._noApply) {
|
||||
if (this._sendUndoPoint) {
|
||||
|
@ -1625,7 +1626,10 @@ define([
|
|||
},
|
||||
|
||||
onPositionChange: function(btn) {
|
||||
var pos = btn.getNumberValue();
|
||||
var pos = btn.getNumberValue(),
|
||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||
maxValue = (this.GradColor.currentIdx+1<this.GradColor.values.length) ? this.GradColor.values[this.GradColor.currentIdx+1] : 100,
|
||||
needSort = pos < minValue || pos > maxValue;
|
||||
if (this.api) {
|
||||
this.GradColor.values[this.GradColor.currentIdx] = pos;
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
|
@ -1641,6 +1645,11 @@ define([
|
|||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.asc_setGraphicObjectProps(this.imgprops);
|
||||
if (needSort) {
|
||||
this.sldrGradient.sortThumbs();
|
||||
this.sldrGradient.trigger('change', this.sldrGradient);
|
||||
this.sldrGradient.trigger('changecomplete', this.sldrGradient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue