[DE] Fix position image setting in form settings

This commit is contained in:
JuliaSvinareva 2021-08-05 15:34:28 +03:00
parent f466027c0f
commit 817d6338f1
2 changed files with 3 additions and 5 deletions

View file

@ -85,7 +85,6 @@
</tr> </tr>
<tr class="form-image"> <tr class="form-image">
<td class="padding-large"> <td class="padding-large">
<label class="input-label"><%= scope.textButton %></label>
<div id="form-cnt-position" style="width: 100%;"> <div id="form-cnt-position" style="width: 100%;">
<div class="row"> <div class="row">
<div id="form-img-position-preview"> <div id="form-img-position-preview">

View file

@ -942,7 +942,7 @@ define([
this.sldrPreviewPositionX.setValue(val); this.sldrPreviewPositionX.setValue(val);
this._state.imgPositionX = val; this._state.imgPositionX = val;
} }
val = pictPr.get_ShiftY() * 100; val = 100 - (pictPr.get_ShiftY() * 100);
if (this._state.imgPositionY !== val) { if (this._state.imgPositionY !== val) {
this.sldrPreviewPositionY.setValue(val); this.sldrPreviewPositionY.setValue(val);
this._state.imgPositionY = val; this._state.imgPositionY = val;
@ -1205,7 +1205,7 @@ define([
val = this._state.imgPositionX / 100; val = this._state.imgPositionX / 100;
pictPr.put_ShiftX(val); pictPr.put_ShiftX(val);
} else { } else {
val = this._state.imgPositionY / 100; val = (100 - this._state.imgPositionY) / 100;
pictPr.put_ShiftY(val); pictPr.put_ShiftY(val);
} }
props.put_PictureFormPr(pictPr); props.put_PictureFormPr(pictPr);
@ -1252,8 +1252,7 @@ define([
textNever: 'Never', textNever: 'Never',
textTooBig: 'Image is Too Big', textTooBig: 'Image is Too Big',
textTooSmall: 'Image is Too Small', textTooSmall: 'Image is Too Small',
textScale: 'When to scale', textScale: 'When to scale'
textButton: 'Button'
}, DE.Views.FormSettings || {})); }, DE.Views.FormSettings || {}));
}); });