[PE] Fix placement settings in advanced settings
This commit is contained in:
parent
ee84a1d160
commit
162e223f68
|
@ -21,7 +21,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-small"></div>
|
|
||||||
<div class="inner-content">
|
<div class="inner-content">
|
||||||
<table cols="2" style="width: 100%;">
|
<table cols="2" style="width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large"></div>
|
|
||||||
<div class="inner-content">
|
<div class="inner-content">
|
||||||
<table cols="2" style="width: 100%;">
|
<table cols="2" style="width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -252,25 +252,27 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
|
||||||
if (props ){
|
if (props ){
|
||||||
this.spnWidth.setMaxValue(this.sizeMax.width);
|
this.spnWidth.setMaxValue(this.sizeMax.width);
|
||||||
this.spnHeight.setMaxValue(this.sizeMax.height);
|
this.spnHeight.setMaxValue(this.sizeMax.height);
|
||||||
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Width()).toFixed(2), true);
|
|
||||||
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Height()).toFixed(2), true);
|
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true);
|
||||||
|
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getHeight()).toFixed(2), true);
|
||||||
|
|
||||||
|
if (props.asc_getHeight()>0)
|
||||||
|
this._nRatio = props.asc_getWidth()/props.asc_getHeight();
|
||||||
|
|
||||||
var value = props.asc_getLockAspect();
|
var value = props.asc_getLockAspect();
|
||||||
this.btnRatio.toggle(value);
|
this.btnRatio.toggle(value);
|
||||||
if (props.get_Height()>0)
|
|
||||||
this._nRatio = props.get_Width()/props.get_Height();
|
|
||||||
|
|
||||||
this.cmbFromX.setValue('left');
|
this.cmbFromX.setValue('left');
|
||||||
this.cmbFromY.setValue('left');
|
this.cmbFromY.setValue('left');
|
||||||
|
|
||||||
/*if (props.get_Position()) {
|
if (props.asc_getPosition()) {
|
||||||
var Position = {X: props.get_Position().get_X(), Y: props.get_Position().get_Y()};
|
var Position = {X: props.asc_getPosition().get_X(), Y: props.asc_getPosition().get_Y()};
|
||||||
this.spnX.setValue((Position.X !== null && Position.X !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.X) : '', true);
|
this.spnX.setValue((Position.X !== null && Position.X !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.X) : '', true);
|
||||||
this.spnY.setValue((Position.Y !== null && Position.Y !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.Y) : '', true);
|
this.spnY.setValue((Position.Y !== null && Position.Y !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.Y) : '', true);
|
||||||
} else {*/
|
} else {
|
||||||
this.spnX.setValue('', true);
|
this.spnX.setValue('', true);
|
||||||
this.spnY.setValue('', true);
|
this.spnY.setValue('', true);
|
||||||
/*}*/
|
}
|
||||||
|
|
||||||
var value = props.asc_getTitle();
|
var value = props.asc_getTitle();
|
||||||
this.inputAltTitle.setValue(value ? value : '');
|
this.inputAltTitle.setValue(value ? value : '');
|
||||||
|
@ -283,7 +285,7 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
|
||||||
},
|
},
|
||||||
|
|
||||||
getSettings: function() {
|
getSettings: function() {
|
||||||
/*var Position = new Asc.CPosition();
|
var Position = new Asc.CPosition();
|
||||||
if (this.spnX.getValue() !== '') {
|
if (this.spnX.getValue() !== '') {
|
||||||
var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue());
|
var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue());
|
||||||
if (this.cmbFromX.getValue() === 'center') {
|
if (this.cmbFromX.getValue() === 'center') {
|
||||||
|
@ -298,7 +300,7 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
|
||||||
}
|
}
|
||||||
Position.put_Y(y);
|
Position.put_Y(y);
|
||||||
}
|
}
|
||||||
this._changedProps.put_Position(Position);*/
|
this._changedProps.asc_putPosition(Position);
|
||||||
|
|
||||||
if (this.isAltTitleChanged)
|
if (this.isAltTitleChanged)
|
||||||
this._changedProps.asc_putTitle(this.inputAltTitle.getValue());
|
this._changedProps.asc_putTitle(this.inputAltTitle.getValue());
|
||||||
|
|
|
@ -625,11 +625,11 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
|
||||||
this.radioFit.setDisabled(true);
|
this.radioFit.setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Width()).toFixed(2), true);
|
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true);
|
||||||
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Height()).toFixed(2), true);
|
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getHeight()).toFixed(2), true);
|
||||||
|
|
||||||
if (props.get_Height()>0)
|
if (props.asc_getHeight()>0)
|
||||||
this._nRatio = props.get_Width()/props.get_Height();
|
this._nRatio = props.asc_getWidth()/props.asc_getHeight();
|
||||||
|
|
||||||
var value = props.asc_getLockAspect();
|
var value = props.asc_getLockAspect();
|
||||||
this.btnRatio.toggle(value);
|
this.btnRatio.toggle(value);
|
||||||
|
@ -637,14 +637,14 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
|
||||||
this.cmbFromX.setValue('left');
|
this.cmbFromX.setValue('left');
|
||||||
this.cmbFromY.setValue('left');
|
this.cmbFromY.setValue('left');
|
||||||
|
|
||||||
/*if (props.get_Position()) {
|
if (props.asc_getPosition()) {
|
||||||
var Position = {X: props.get_Position().get_X(), Y: props.get_Position().get_Y()};
|
var Position = {X: props.asc_getPosition().get_X(), Y: props.asc_getPosition().get_Y()};
|
||||||
this.spnX.setValue((Position.X !== null && Position.X !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.X) : '', true);
|
this.spnX.setValue((Position.X !== null && Position.X !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.X) : '', true);
|
||||||
this.spnY.setValue((Position.Y !== null && Position.Y !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.Y) : '', true);
|
this.spnY.setValue((Position.Y !== null && Position.Y !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.Y) : '', true);
|
||||||
} else {*/
|
} else {
|
||||||
this.spnX.setValue('', true);
|
this.spnX.setValue('', true);
|
||||||
this.spnY.setValue('', true);
|
this.spnY.setValue('', true);
|
||||||
/*}*/
|
}
|
||||||
|
|
||||||
this._setShapeDefaults(props);
|
this._setShapeDefaults(props);
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
|
||||||
},
|
},
|
||||||
|
|
||||||
getSettings: function() {
|
getSettings: function() {
|
||||||
/*var Position = new Asc.CPosition();
|
var Position = new Asc.CPosition();
|
||||||
if (this.spnX.getValue() !== '') {
|
if (this.spnX.getValue() !== '') {
|
||||||
var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue());
|
var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue());
|
||||||
if (this.cmbFromX.getValue() === 'center') {
|
if (this.cmbFromX.getValue() === 'center') {
|
||||||
|
@ -717,7 +717,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
|
||||||
}
|
}
|
||||||
Position.put_Y(y);
|
Position.put_Y(y);
|
||||||
}
|
}
|
||||||
this._changedProps.put_Position(Position);*/
|
this._changedProps.asc_putPosition(Position);
|
||||||
|
|
||||||
if (this.isAltTitleChanged)
|
if (this.isAltTitleChanged)
|
||||||
this._changedProps.asc_putTitle(this.inputAltTitle.getValue());
|
this._changedProps.asc_putTitle(this.inputAltTitle.getValue());
|
||||||
|
|
|
@ -50,7 +50,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
|
||||||
contentWidth: 280,
|
contentWidth: 280,
|
||||||
height: 385,
|
height: 385,
|
||||||
storageName: 'pe-table-settings-adv-category',
|
storageName: 'pe-table-settings-adv-category',
|
||||||
sizeMax: {width: 142.24, height: 142.24},
|
sizeMax: {width: 55.88, height: 55.88},
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
|
@ -103,7 +103,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
|
||||||
width: 100,
|
width: 100,
|
||||||
defaultUnit : "cm",
|
defaultUnit : "cm",
|
||||||
value: '3 cm',
|
value: '3 cm',
|
||||||
maxValue: 142.24,
|
maxValue: 55.88,
|
||||||
minValue: 0
|
minValue: 0
|
||||||
});
|
});
|
||||||
this.spnWidth.on('change', _.bind(function(field){
|
this.spnWidth.on('change', _.bind(function(field){
|
||||||
|
@ -126,7 +126,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
|
||||||
width: 100,
|
width: 100,
|
||||||
defaultUnit : "cm",
|
defaultUnit : "cm",
|
||||||
value: '3 cm',
|
value: '3 cm',
|
||||||
maxValue: 142.24,
|
maxValue: 55.88,
|
||||||
minValue: 0
|
minValue: 0
|
||||||
});
|
});
|
||||||
this.spnHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
this.spnHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||||
|
@ -466,7 +466,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
|
||||||
this._changedProps.put_FrameHeight(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue()));
|
this._changedProps.put_FrameHeight(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue()));
|
||||||
if (this.spnWidth.getValue()!=='')
|
if (this.spnWidth.getValue()!=='')
|
||||||
this._changedProps.put_FrameWidth(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()));
|
this._changedProps.put_FrameWidth(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()));
|
||||||
//properties.asc_putLockAspect(this.btnRatio.pressed);
|
this._changedProps.put_FrameLockAspect(this.btnRatio.pressed);
|
||||||
|
|
||||||
if (this.spnX.getValue() !== '') {
|
if (this.spnX.getValue() !== '') {
|
||||||
var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue());
|
var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue());
|
||||||
|
@ -502,7 +502,8 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
|
||||||
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_FrameWidth()).toFixed(2), true);
|
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_FrameWidth()).toFixed(2), true);
|
||||||
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_FrameHeight()).toFixed(2), true);
|
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_FrameHeight()).toFixed(2), true);
|
||||||
|
|
||||||
this.btnRatio.toggle(false); // to do
|
var value = props.get_FrameLockAspect();
|
||||||
|
this.btnRatio.toggle(value);
|
||||||
if (props.get_FrameHeight()>0)
|
if (props.get_FrameHeight()>0)
|
||||||
this._nRatio = props.get_FrameWidth()/props.get_FrameHeight();
|
this._nRatio = props.get_FrameWidth()/props.get_FrameHeight();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue