mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 01:31:33 +08:00
Fix bugs
refactoring
This commit is contained in:
@ -77,8 +77,7 @@ define([
|
||||
this.imgprops = null;
|
||||
this._sendUndoPoint = true;
|
||||
this._sliderChanged = false;
|
||||
this._sendLineUndoPoint = true;
|
||||
this._sliderLineChanged = false;
|
||||
this._sliderChangedLine = false;
|
||||
this._texturearray = null;
|
||||
|
||||
this.txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt);
|
||||
@ -146,7 +145,6 @@ define([
|
||||
this.FillPatternContainer = $('#shape-panel-pattern-fill');
|
||||
this.FillGradientContainer = $('#shape-panel-gradient-fill');
|
||||
this.TransparencyContainer = $('#shape-panel-transparent-fill');
|
||||
this.LineTransparencyContainer = $('#shape-line-panel-transparent');
|
||||
this.ShapeOnlySettings = $('.shape-only');
|
||||
this.CanChangeType = $('.change-type');
|
||||
this.RotationSettings = $('.shape-rotation');
|
||||
@ -688,10 +686,10 @@ define([
|
||||
|
||||
onNumLineTransparencyChange: function(field, newValue, oldValue, eOpts){
|
||||
this.sldrLineTransparency.setValue(field.getNumberValue(), true);
|
||||
if (this.api) {
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
if (this.api && this.BorderSize>0 && !this._noApply) {
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.put_stroke(stroke);
|
||||
this.imgprops.put_ShapeProperties(props);
|
||||
@ -700,36 +698,27 @@ define([
|
||||
},
|
||||
|
||||
onLineTransparencyChange: function(field, newValue, oldValue){
|
||||
this._sliderLineChanged = newValue;
|
||||
this._sliderChangedLine = newValue;
|
||||
this.numLineTransparency.setValue(newValue, true);
|
||||
if (this._sendLineUndoPoint) {
|
||||
this.api.setStartPointHistory();
|
||||
this._sendLineUndoPoint = false;
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
}
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
},
|
||||
|
||||
onLineTransparencyChangeComplete: function(field, newValue, oldValue){
|
||||
clearInterval(this.updatesliderline);
|
||||
this._sliderlineChanged = newValue;
|
||||
if (!this._sendLineUndoPoint) { // start point was added
|
||||
this.api.setEndPointHistory();
|
||||
this._transparencyLineApplyFunc();
|
||||
}
|
||||
this._sendLineUndoPoint = true;
|
||||
this._sliderChangedLine = newValue;
|
||||
this._transparencyLineApplyFunc();
|
||||
},
|
||||
|
||||
_transparencyLineApplyFunc: function() {
|
||||
if (this._sliderLineChanged!==undefined) {
|
||||
if (this._sliderChangedLine!==undefined) {
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = this._sliderLineChanged * 2.55;
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.put_stroke(stroke);
|
||||
|
||||
this.imgprops.put_ShapeProperties(props);
|
||||
this.api.ImgApply(this.imgprops);
|
||||
this._sliderLineChanged = undefined;
|
||||
this._sliderChangedLine = undefined;
|
||||
}
|
||||
},
|
||||
|
||||
@ -1653,8 +1642,8 @@ define([
|
||||
this.sldrLineTransparency.on('changecomplete', _.bind(this.onLineTransparencyChangeComplete, this));/**/
|
||||
this.lockedControls.push(this.sldrLineTransparency);
|
||||
|
||||
this.lockedControls.push( $(this.el).find('#shape-line-lbl-transparency-start'));
|
||||
this.lockedControls.push( $(this.el).find('#shape-line-lbl-transparency-end'));
|
||||
this.lblLineTransparencyStart = $(this.el).find('#shape-line-lbl-transparency-start');
|
||||
this.lblLineTransparencyEnd = $(this.el).find('#shape-line-lbl-transparency-end');
|
||||
|
||||
this.numLineTransparency = new Common.UI.MetricSpinner({
|
||||
el: $('#shape-line-spin-transparency'),
|
||||
@ -2078,6 +2067,8 @@ define([
|
||||
item.setDisabled(disable);
|
||||
});
|
||||
this.linkAdvanced.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyStart.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyEnd.toggleClass('disabled', disable);
|
||||
}
|
||||
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||
|
||||
@ -552,48 +552,39 @@ define([
|
||||
|
||||
onNumLineTransparencyChange: function(field, newValue, oldValue, eOpts){
|
||||
this.sldrLineTransparency.setValue(field.getNumberValue(), true);
|
||||
if (this.api) {
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
if (this.api && this.BorderSize>0 && !this._noApply) {
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.asc_putLine(stroke);
|
||||
props.put_stroke(stroke);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ImgApply(this.imgprops);
|
||||
}
|
||||
},
|
||||
|
||||
onLineTransparencyChange: function(field, newValue, oldValue){
|
||||
this._sliderLineChanged = newValue;
|
||||
this._sliderChangedLine = newValue;
|
||||
this.numLineTransparency.setValue(newValue, true);
|
||||
|
||||
if (this._sendLineUndoPoint) {
|
||||
this.api.setStartPointHistory();
|
||||
this._sendLineUndoPoint = false;
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
}
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
},
|
||||
|
||||
onLineTransparencyChangeComplete: function(field, newValue, oldValue){
|
||||
clearInterval(this.updatesliderline);
|
||||
this._sliderLineChanged = newValue;
|
||||
if (!this._sendLineUndoPoint) { // start point was added
|
||||
this.api.setEndPointHistory();
|
||||
this._transparencyLineApplyFunc();
|
||||
}
|
||||
this._sendLineUndoPoint = true;
|
||||
this._sliderChangedLine = newValue;
|
||||
this._transparencyLineApplyFunc();
|
||||
},
|
||||
|
||||
_transparencyLineApplyFunc: function() {
|
||||
if (this._sliderLineChanged!==undefined) {
|
||||
if (this._sliderChangedLine!==undefined) {
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = this._sliderLineChanged * 2.55;
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.asc_putLine(stroke);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ImgApply(this.imgprops);
|
||||
this._sliderLineChanged = undefined;
|
||||
this._sliderChangedLine = undefined;
|
||||
}
|
||||
},
|
||||
|
||||
@ -1209,8 +1200,8 @@ define([
|
||||
this.sldrLineTransparency.on('changecomplete', _.bind(this.onLineTransparencyChangeComplete, this));
|
||||
this.lockedControls.push(this.sldrLineTransparency);
|
||||
|
||||
this.lockedControls.push($(this.el).find('#textart-lbl-transparency-start'));
|
||||
this.lockedControls.push($(this.el).find('#textart-lbl-transparency-end'));
|
||||
this.lblLineTransparencyStart = $(this.el).find('#textart-line-lbl-transparency-start');
|
||||
this.lblLineTransparencyEnd = $(this.el).find('#textart-line-lbl-transparency-end');
|
||||
|
||||
this.cmbTransform = new Common.UI.ComboDataView({
|
||||
itemWidth: 50,
|
||||
@ -1395,6 +1386,8 @@ define([
|
||||
item.setDisabled(disable);
|
||||
});
|
||||
this.numGradientAngle.setDisabled(disable || this.GradFillType !== Asc.c_oAscFillGradType.GRAD_LINEAR);
|
||||
this.lblLineTransparencyStart.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyEnd.toggleClass('disabled', disable);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -134,6 +134,14 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<div style="display:inline-block;width:100px;vertical-align: middle;">
|
||||
<label class="input-label" style=""><%= scope.strType %></label>
|
||||
<div id="shape-combo-border-type" style="width: 93px;"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="padding-small" id="shape-line-panel-transparent" style="width: 100%;">
|
||||
@ -147,14 +155,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<div style="display:inline-block;width:100px;vertical-align: middle;">
|
||||
<label class="input-label" style=""><%= scope.strType %></label>
|
||||
<div id="shape-combo-border-type" style="width: 93px;"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="shape-rotation">
|
||||
<td class="padding-small">
|
||||
<div class="separator horizontal"></div>
|
||||
|
||||
@ -687,46 +687,40 @@ define([
|
||||
|
||||
onNumLineTransparencyChange: function(field, newValue, oldValue, eOpts){
|
||||
this.sldrLineTransparency.setValue(field.getNumberValue(), true);
|
||||
if (this.api) {
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
if (this.api && this.BorderSize>0 && !this._noApply) {
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.put_stroke(stroke);
|
||||
this.api.ShapeApply(props);
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
onLineTransparencyChange: function(field, newValue, oldValue){
|
||||
this._sliderLineChanged = newValue;
|
||||
this._sliderChangedLine = newValue;
|
||||
this.numLineTransparency.setValue(newValue, true);
|
||||
if (this._sendLineUndoPoint) {
|
||||
this.api.setStartPointHistory();
|
||||
this._sendLineUndoPoint = false;
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
}
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
},
|
||||
|
||||
onLineTransparencyChangeComplete: function(field, newValue, oldValue){
|
||||
clearInterval(this.updatesliderline);
|
||||
this._sliderlineChanged = newValue;
|
||||
if (!this._sendLineUndoPoint) { // start point was added
|
||||
this.api.setEndPointHistory();
|
||||
this._transparencyLineApplyFunc();
|
||||
}
|
||||
this._sendLineUndoPoint = true;
|
||||
this._sliderChangedLine = newValue;
|
||||
this._transparencyLineApplyFunc();
|
||||
},
|
||||
|
||||
_transparencyLineApplyFunc: function() {
|
||||
if (this._sliderLineChanged!==undefined) {
|
||||
if (this._sliderChangedLine!==undefined) {
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = this._sliderLineChanged * 2.55;
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.put_stroke(stroke);
|
||||
this.api.ShapeApply(props);
|
||||
this._sliderLineChanged = undefined;
|
||||
this._sliderChangedLine = undefined;
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
setImageUrl: function(url, token) {
|
||||
@ -1570,8 +1564,8 @@ define([
|
||||
this.sldrLineTransparency.on('changecomplete', _.bind(this.onLineTransparencyChangeComplete, this));
|
||||
this.lockedControls.push(this.sldrLineTransparency);
|
||||
|
||||
this.lockedControls.push( $(this.el).find('#shape-line-lbl-transparency-start'));
|
||||
this.lockedControls.push( $(this.el).find('#shape-line-lbl-transparency-end'));
|
||||
this.lblLineTransparencyStart = $(this.el).find('#shape-line-lbl-transparency-start');
|
||||
this.lblLineTransparencyEnd = $(this.el).find('#shape-line-lbl-transparency-end');
|
||||
|
||||
this.btnChangeShape = new Common.UI.Button({
|
||||
parentEl: $('#shape-btn-change'),
|
||||
@ -1937,6 +1931,8 @@ define([
|
||||
item.setDisabled(disable);
|
||||
});
|
||||
this.linkAdvanced.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyStart.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyEnd.toggleClass('disabled', disable);
|
||||
}
|
||||
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||
|
||||
@ -677,8 +677,8 @@ define([
|
||||
|
||||
onNumLineTransparencyChange: function(field, newValue, oldValue, eOpts){
|
||||
this.sldrLineTransparency.setValue(field.getNumberValue(), true);
|
||||
if (this.api) {
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
if (this.api && this.BorderSize>0 && !this._noApply) {
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
@ -686,40 +686,33 @@ define([
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ShapeApply(this.shapeprops);
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
onLineTransparencyChange: function(field, newValue, oldValue){
|
||||
this._sliderChangedLine = newValue;
|
||||
this.numLineTransparency.setValue(newValue, true);
|
||||
|
||||
if (this._sendLineUndoPoint) {
|
||||
this.api.setStartPointHistory();
|
||||
this._sendLineUndoPoint = false;
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
}
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
},
|
||||
|
||||
onLineTransparencyChangeComplete: function(field, newValue, oldValue){
|
||||
clearInterval(this.updatesliderline);
|
||||
this._sliderChangedLine = newValue;
|
||||
if (!this._sendLineUndoPoint) { // start point was added
|
||||
this.api.setEndPointHistory();
|
||||
this._transparencyLineApplyFunc();
|
||||
}
|
||||
this._sendLineUndoPoint = true;
|
||||
this._transparencyLineApplyFunc();
|
||||
},
|
||||
|
||||
_transparencyLineApplyFunc: function() {
|
||||
if (this._sliderChangedLine!==undefined) {
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
stroke.put_transparent(this._state.LineTransparency);
|
||||
props.asc_putLine(stroke);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
this.api.ShapeApply(this.shapeprops);
|
||||
this._sliderChangedLine = undefined;
|
||||
}
|
||||
this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
insertFromUrl: function() {
|
||||
@ -1529,10 +1522,10 @@ define([
|
||||
});
|
||||
this.sldrLineTransparency.on('change', _.bind(this.onLineTransparencyChange, this));
|
||||
this.sldrLineTransparency.on('changecomplete', _.bind(this.onLineTransparencyChangeComplete, this));
|
||||
this.lockedControls.push(this.sldrTransparency);
|
||||
this.lockedControls.push(this.sldrLineTransparency);
|
||||
|
||||
this.lockedControls.push($(this.el).find('#textart-lbl-transparency-start'));
|
||||
this.lockedControls.push( $(this.el).find('#textart-lbl-transparency-end'));
|
||||
this.lblLineTransparencyStart = $(this.el).find('#textart-line-lbl-transparency-start');
|
||||
this.lblLineTransparencyEnd = $(this.el).find('#textart-line-lbl-transparency-end');
|
||||
|
||||
this.cmbTransform = new Common.UI.ComboDataView({
|
||||
itemWidth: 50,
|
||||
@ -1849,6 +1842,8 @@ define([
|
||||
item.setDisabled(disable);
|
||||
});
|
||||
this.numGradientAngle.setDisabled(disable || this.GradFillType !== Asc.c_oAscFillGradType.GRAD_LINEAR);
|
||||
this.lblLineTransparencyStart.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyEnd.toggleClass('disabled', disable);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -677,9 +677,9 @@ define([
|
||||
},
|
||||
|
||||
onNumLineTransparencyChange: function(field, newValue, oldValue, eOpts){
|
||||
this.sldrTransparency.setValue(field.getNumberValue(), true);
|
||||
if (this.api) {
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
this.sldrLineTransparency.setValue(field.getNumberValue(), true);
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
if (this.api && !this._noApply) {
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
stroke.asc_putTransparent(this._state.LineTransparency);
|
||||
@ -692,29 +692,20 @@ define([
|
||||
onLineTransparencyChange: function(field, newValue, oldValue){
|
||||
this._sliderChangedLine = newValue;
|
||||
this.numLineTransparency.setValue(newValue, true);
|
||||
|
||||
if (this._sendLineUndoPoint) {
|
||||
this.api.setStartPointHistory();
|
||||
this._sendLineUndoPoint = false;
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
}
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
},
|
||||
|
||||
onLineTransparencyChangeComplete: function(field, newValue, oldValue){
|
||||
clearInterval(this.updatesliderline);
|
||||
this._sliderChangedLine = newValue;
|
||||
if (!this._sendLineUndoPoint) { // start point was added
|
||||
this.api.setEndPointHistory();
|
||||
this._transparencyLineApplyFunc();
|
||||
}
|
||||
this._sendLineUndoPoint = true;
|
||||
this._transparencyLineApplyFunc();
|
||||
},
|
||||
|
||||
_transparencyLineApplyFunc: function() {
|
||||
if (this._sliderChangedLine!==undefined) {
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
var props = new Asc.asc_CShapeProperty();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
stroke.asc_putTransparent(this._state.LineTransparency);
|
||||
props.asc_putStroke(stroke);
|
||||
this.imgprops.asc_putShapeProperties(props);
|
||||
@ -1588,8 +1579,8 @@ define([
|
||||
this.sldrLineTransparency.on('changecomplete', _.bind(this.onLineTransparencyChangeComplete, this));
|
||||
this.lockedControls.push(this.sldrLineTransparency);
|
||||
|
||||
this.lockedControls.push($(this.el).find('#shape-lbl-transparency-start'));
|
||||
this.lockedControls.push($(this.el).find('#shape-lbl-transparency-end'));
|
||||
this.lblLineTransparencyStart = $(this.el).find('#shape-line-lbl-transparency-start');
|
||||
this.lblLineTransparencyEnd = $(this.el).find('#shape-line-lbl-transparency-end');
|
||||
|
||||
this.btnChangeShape = new Common.UI.Button({
|
||||
parentEl: $('#shape-btn-change'),
|
||||
@ -1958,6 +1949,8 @@ define([
|
||||
item.setDisabled(disable);
|
||||
});
|
||||
this.linkAdvanced.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyStart.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyEnd.toggleClass('disabled', disable);
|
||||
}
|
||||
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||
|
||||
@ -671,8 +671,8 @@ define([
|
||||
|
||||
onNumLineTransparencyChange: function(field, newValue, oldValue, eOpts){
|
||||
this.sldrLineTransparency.setValue(field.getNumberValue(), true);
|
||||
if (this.api) {
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
this._state.LineTransparency = field.getNumberValue() * 2.55;
|
||||
if (this.api && this.BorderSize>0 && !this._noApply) {
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
stroke.asc_putTransparent(this._state.LineTransparency);
|
||||
@ -685,29 +685,20 @@ define([
|
||||
onLineTransparencyChange: function(field, newValue, oldValue){
|
||||
this._sliderChangedLine = newValue;
|
||||
this.numLineTransparency.setValue(newValue, true);
|
||||
|
||||
if (this._sendLineUndoPoint) {
|
||||
this.api.setStartPointHistory();
|
||||
this._sendLineUndoPoint = false;
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
}
|
||||
this.updatesliderline = setInterval(_.bind(this._transparencyLineApplyFunc, this), 100);
|
||||
},
|
||||
|
||||
onLineTransparencyChangeComplete: function(field, newValue, oldValue){
|
||||
clearInterval(this.updatesliderline);
|
||||
this._sliderChangedLine = newValue;
|
||||
if (!this._sendLineUndoPoint) { // start point was added
|
||||
this.api.setEndPointHistory();
|
||||
this._transparencyLineApplyFunc();
|
||||
}
|
||||
this._sendUndoPoint = true;
|
||||
this._transparencyLineApplyFunc();
|
||||
},
|
||||
|
||||
_transparencyLineApplyFunc: function() {
|
||||
if (this._sliderChangedLine!==undefined) {
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
var props = new Asc.asc_TextArtProperties();
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
this._state.LineTransparency = this._sliderChangedLine * 2.55;
|
||||
stroke.asc_putTransparent(this._state.LineTransparency);
|
||||
props.asc_putLine(stroke);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
@ -1487,7 +1478,7 @@ define([
|
||||
this.lockedControls.push(this.cmbBorderSize);
|
||||
|
||||
this.cmbBorderType = new Common.UI.ComboBorderType({
|
||||
el: $('#textart-line-combo-border-type'),
|
||||
el: $('#textart-combo-border-type'),
|
||||
style: "width: 93px;",
|
||||
menuStyle: 'min-width: 93px;',
|
||||
dataHint: '1',
|
||||
@ -1526,8 +1517,8 @@ define([
|
||||
this.sldrLineTransparency.on('changecomplete', _.bind(this.onLineTransparencyChangeComplete, this));
|
||||
this.lockedControls.push(this.sldrLineTransparency);
|
||||
|
||||
this.lockedControls.push($(this.el).find('#textart-line-lbl-transparency-start'));
|
||||
this.lockedControls.push($(this.el).find('#textart-line-lbl-transparency-end'));
|
||||
this.lblLineTransparencyStart = $(this.el).find('#textart-line-lbl-transparency-start');
|
||||
this.lblLineTransparencyEnd = $(this.el).find('#textart-line-lbl-transparency-end');
|
||||
|
||||
this.cmbTransform = new Common.UI.ComboDataView({
|
||||
itemWidth: 50,
|
||||
@ -1844,6 +1835,8 @@ define([
|
||||
item.setDisabled(disable);
|
||||
});
|
||||
this.numGradientAngle.setDisabled(disable || this.GradFillType !== Asc.c_oAscFillGradType.GRAD_LINEAR);
|
||||
this.lblLineTransparencyStart.toggleClass('disabled', disable);
|
||||
this.lblLineTransparencyEnd.toggleClass('disabled', disable);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user