[DE] Debug image advanced settings.

This commit is contained in:
Julia Radzhabova 2017-04-25 16:16:12 +03:00
parent ef3fbc630b
commit 76efc03e39
4 changed files with 1 additions and 17 deletions

View file

@ -1436,7 +1436,7 @@ define([
if (item.value !== 'advanced') if (item.value !== 'advanced')
this.api.change_DocSize(item.value[0], item.value[1]); this.api.change_DocSize(item.value[0], item.value[1]);
else { else {
var win, props = this.api.asc_GetSectionProps(), var win, props,
me = this; me = this;
win = new DE.Views.PageSizeDialog({ win = new DE.Views.PageSizeDialog({
handler: function(dlg, result) { handler: function(dlg, result) {

View file

@ -396,13 +396,9 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (Asc.c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeMax = this.api.GetSectionInfo();
imgsizeMax = {width: imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft()+imgsizeMax.get_MarginRight()),
height:imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop()+imgsizeMax.get_MarginBottom())};
(new DE.Views.ImageSettingsAdvanced( (new DE.Views.ImageSettingsAdvanced(
{ {
imageProps: elValue, imageProps: elValue,
sizeMax: imgsizeMax,
sectionProps: me.api.asc_GetSectionProps(), sectionProps: me.api.asc_GetSectionProps(),
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {

View file

@ -1954,16 +1954,9 @@ define([
imgsizeOriginal = {width:imgsizeOriginal.get_ImageWidth(), height:imgsizeOriginal.get_ImageHeight()}; imgsizeOriginal = {width:imgsizeOriginal.get_ImageWidth(), height:imgsizeOriginal.get_ImageHeight()};
} }
var imgsizeMax = me.api.GetSectionInfo();
imgsizeMax = {
width : imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft() + imgsizeMax.get_MarginRight()),
height : imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop() + imgsizeMax.get_MarginBottom())
};
var win = new DE.Views.ImageSettingsAdvanced({ var win = new DE.Views.ImageSettingsAdvanced({
imageProps : elValue, imageProps : elValue,
sizeOriginal: imgsizeOriginal, sizeOriginal: imgsizeOriginal,
sizeMax : imgsizeMax,
sectionProps: me.api.asc_GetSectionProps(), sectionProps: me.api.asc_GetSectionProps(),
handler : function(result, value) { handler : function(result, value) {
if (result == 'ok') { if (result == 'ok') {

View file

@ -359,15 +359,10 @@ define([
if (imgsizeOriginal) if (imgsizeOriginal)
imgsizeOriginal = {width:imgsizeOriginal.get_ImageWidth(), height:imgsizeOriginal.get_ImageHeight()}; imgsizeOriginal = {width:imgsizeOriginal.get_ImageWidth(), height:imgsizeOriginal.get_ImageHeight()};
} }
var imgsizeMax = this.api.GetSectionInfo();
imgsizeMax = {width: imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft()+imgsizeMax.get_MarginRight()),
height:imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop()+imgsizeMax.get_MarginBottom())};
(new DE.Views.ImageSettingsAdvanced( (new DE.Views.ImageSettingsAdvanced(
{ {
imageProps: elValue, imageProps: elValue,
sizeOriginal: imgsizeOriginal, sizeOriginal: imgsizeOriginal,
sizeMax: imgsizeMax,
sectionProps: me.api.asc_GetSectionProps(), sectionProps: me.api.asc_GetSectionProps(),
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {