Edit geometry of shapes
This commit is contained in:
parent
907420a123
commit
ef9157dc1e
|
@ -2416,6 +2416,10 @@ define([
|
||||||
caption : me.editChartText
|
caption : me.editChartText
|
||||||
}).on('click', _.bind(me.editChartClick, me));
|
}).on('click', _.bind(me.editChartClick, me));
|
||||||
|
|
||||||
|
var menuChartEditSeparator = new Common.UI.MenuItem({
|
||||||
|
caption : '--'
|
||||||
|
});
|
||||||
|
|
||||||
this.menuOriginalSize = new Common.UI.MenuItem({
|
this.menuOriginalSize = new Common.UI.MenuItem({
|
||||||
caption : me.originalSizeText
|
caption : me.originalSizeText
|
||||||
}).on('click', function(item, e) {
|
}).on('click', function(item, e) {
|
||||||
|
@ -2572,6 +2576,16 @@ define([
|
||||||
caption : '--'
|
caption : '--'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var menuImgEditPoints = new Common.UI.MenuItem({
|
||||||
|
caption: me.textEditPoints
|
||||||
|
}).on('click', function(item) {
|
||||||
|
me.api && me.api.asc_editPointsGeometry();
|
||||||
|
});
|
||||||
|
|
||||||
|
var menuImgEditPointsSeparator = new Common.UI.MenuItem({
|
||||||
|
caption : '--'
|
||||||
|
});
|
||||||
|
|
||||||
this.pictureMenu = new Common.UI.Menu({
|
this.pictureMenu = new Common.UI.Menu({
|
||||||
cls: 'shifted-right',
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
|
@ -2678,7 +2692,7 @@ define([
|
||||||
if (menuChartEdit.isVisible())
|
if (menuChartEdit.isVisible())
|
||||||
menuChartEdit.setDisabled(islocked || value.imgProps.value.get_SeveralCharts());
|
menuChartEdit.setDisabled(islocked || value.imgProps.value.get_SeveralCharts());
|
||||||
|
|
||||||
me.pictureMenu.items[22].setVisible(menuChartEdit.isVisible());
|
menuChartEditSeparator.setVisible(menuChartEdit.isVisible());
|
||||||
|
|
||||||
me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined);
|
me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined);
|
||||||
menuImageAdvanced.setDisabled(islocked);
|
menuImageAdvanced.setDisabled(islocked);
|
||||||
|
@ -2717,6 +2731,11 @@ define([
|
||||||
menuSignatureEditSign.cmpEl.attr('data-value', signGuid); // sign
|
menuSignatureEditSign.cmpEl.attr('data-value', signGuid); // sign
|
||||||
menuSignatureEditSetup.cmpEl.attr('data-value', signGuid); // edit signature settings
|
menuSignatureEditSetup.cmpEl.attr('data-value', signGuid); // edit signature settings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var canEditPoints = me.api && me.api.asc_canEditGeometry();
|
||||||
|
menuImgEditPoints.setVisible(canEditPoints);
|
||||||
|
menuImgEditPointsSeparator.setVisible(canEditPoints);
|
||||||
|
canEditPoints && menuImgEditPoints.setDisabled(islocked);
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
menuImgCut,
|
menuImgCut,
|
||||||
|
@ -2730,6 +2749,8 @@ define([
|
||||||
menuImgRemoveControl,
|
menuImgRemoveControl,
|
||||||
menuImgControlSettings,
|
menuImgControlSettings,
|
||||||
menuImgControlSeparator,
|
menuImgControlSeparator,
|
||||||
|
menuImgEditPoints,
|
||||||
|
menuImgEditPointsSeparator,
|
||||||
menuImageArrange,
|
menuImageArrange,
|
||||||
menuImageAlign,
|
menuImageAlign,
|
||||||
me.menuImageWrap,
|
me.menuImageWrap,
|
||||||
|
@ -2741,7 +2762,7 @@ define([
|
||||||
me.menuOriginalSize,
|
me.menuOriginalSize,
|
||||||
menuImgReplace,
|
menuImgReplace,
|
||||||
menuChartEdit,
|
menuChartEdit,
|
||||||
{ caption: '--' },
|
menuChartEditSeparator,
|
||||||
menuImageAdvanced
|
menuImageAdvanced
|
||||||
]
|
]
|
||||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||||
|
@ -4697,7 +4718,8 @@ define([
|
||||||
textRemField: 'Remove Text Field',
|
textRemField: 'Remove Text Field',
|
||||||
txtRemoveWarning: 'Do you want to remove this signature?<br>It can\'t be undone.',
|
txtRemoveWarning: 'Do you want to remove this signature?<br>It can\'t be undone.',
|
||||||
notcriticalErrorTitle: 'Warning',
|
notcriticalErrorTitle: 'Warning',
|
||||||
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?'
|
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?',
|
||||||
|
textEditPoints: 'Edit Points'
|
||||||
|
|
||||||
}, DE.Views.DocumentHolder || {}));
|
}, DE.Views.DocumentHolder || {}));
|
||||||
});
|
});
|
|
@ -1598,6 +1598,7 @@
|
||||||
"DE.Views.DocumentHolder.updateStyleText": "Update %1 style",
|
"DE.Views.DocumentHolder.updateStyleText": "Update %1 style",
|
||||||
"DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
"DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||||
"DE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
"DE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
||||||
|
"DE.Views.DocumentHolder.textEditPoints": "Edit Points",
|
||||||
"DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill",
|
"DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill",
|
||||||
"DE.Views.DropcapSettingsAdvanced.strDropcap": "Drop Cap",
|
"DE.Views.DropcapSettingsAdvanced.strDropcap": "Drop Cap",
|
||||||
"DE.Views.DropcapSettingsAdvanced.strMargins": "Margins",
|
"DE.Views.DropcapSettingsAdvanced.strMargins": "Margins",
|
||||||
|
|
|
@ -3112,6 +3112,16 @@ define([
|
||||||
caption : me.addToLayoutText
|
caption : me.addToLayoutText
|
||||||
}).on('click', _.bind(me.addToLayout, me));
|
}).on('click', _.bind(me.addToLayout, me));
|
||||||
|
|
||||||
|
var menuImgEditPoints = new Common.UI.MenuItem({
|
||||||
|
caption: me.textEditPoints
|
||||||
|
}).on('click', function(item) {
|
||||||
|
me.api && me.api.asc_editPointsGeometry();
|
||||||
|
});
|
||||||
|
|
||||||
|
var menuImgEditPointsSeparator = new Common.UI.MenuItem({
|
||||||
|
caption : '--'
|
||||||
|
});
|
||||||
|
|
||||||
me.textMenu = new Common.UI.Menu({
|
me.textMenu = new Common.UI.Menu({
|
||||||
cls: 'shifted-right',
|
cls: 'shifted-right',
|
||||||
initMenu: function(value){
|
initMenu: function(value){
|
||||||
|
@ -3513,6 +3523,11 @@ define([
|
||||||
if (me.menuImgCrop.isVisible())
|
if (me.menuImgCrop.isVisible())
|
||||||
me.menuImgCrop.setDisabled(disabled);
|
me.menuImgCrop.setDisabled(disabled);
|
||||||
|
|
||||||
|
var canEditPoints = me.api && me.api.asc_canEditGeometry();
|
||||||
|
menuImgEditPoints.setVisible(canEditPoints);
|
||||||
|
menuImgEditPointsSeparator.setVisible(canEditPoints);
|
||||||
|
canEditPoints && menuImgEditPoints.setDisabled(disabled);
|
||||||
|
|
||||||
menuImageAdvanced.setVisible(isimage);
|
menuImageAdvanced.setVisible(isimage);
|
||||||
menuShapeAdvanced.setVisible(_.isUndefined(value.imgProps) && _.isUndefined(value.chartProps));
|
menuShapeAdvanced.setVisible(_.isUndefined(value.imgProps) && _.isUndefined(value.chartProps));
|
||||||
menuChartEdit.setVisible(_.isUndefined(value.imgProps) && !_.isUndefined(value.chartProps) && (_.isUndefined(value.shapeProps) || value.shapeProps.isChart));
|
menuChartEdit.setVisible(_.isUndefined(value.imgProps) && !_.isUndefined(value.chartProps) && (_.isUndefined(value.shapeProps) || value.shapeProps.isChart));
|
||||||
|
@ -3544,6 +3559,8 @@ define([
|
||||||
menuImgCopy,
|
menuImgCopy,
|
||||||
menuImgPaste,
|
menuImgPaste,
|
||||||
{ caption: '--' },
|
{ caption: '--' },
|
||||||
|
menuImgEditPoints,
|
||||||
|
menuImgEditPointsSeparator,
|
||||||
menuImgShapeArrange,
|
menuImgShapeArrange,
|
||||||
menuImgShapeAlign,
|
menuImgShapeAlign,
|
||||||
menuImgShapeRotate,
|
menuImgShapeRotate,
|
||||||
|
@ -3967,7 +3984,8 @@ define([
|
||||||
txtResetLayout: 'Reset Slide',
|
txtResetLayout: 'Reset Slide',
|
||||||
mniCustomTable: 'Insert Custom Table',
|
mniCustomTable: 'Insert Custom Table',
|
||||||
textFromStorage: 'From Storage',
|
textFromStorage: 'From Storage',
|
||||||
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?'
|
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?',
|
||||||
|
textEditPoints: 'Edit Points'
|
||||||
|
|
||||||
}, PE.Views.DocumentHolder || {}));
|
}, PE.Views.DocumentHolder || {}));
|
||||||
});
|
});
|
|
@ -1285,6 +1285,7 @@
|
||||||
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
||||||
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||||
"PE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
"PE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
||||||
|
"PE.Views.DocumentHolder.textEditPoints": "Edit Points",
|
||||||
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
|
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
|
||||||
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
|
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
|
||||||
"PE.Views.DocumentPreview.txtClose": "Close slideshow",
|
"PE.Views.DocumentPreview.txtClose": "Close slideshow",
|
||||||
|
|
|
@ -253,6 +253,7 @@ define([
|
||||||
view.pmiAdvancedNumFormat.on('click', _.bind(me.onCustomNumberFormat, me));
|
view.pmiAdvancedNumFormat.on('click', _.bind(me.onCustomNumberFormat, me));
|
||||||
view.tableTotalMenu.on('item:click', _.bind(me.onTotalMenuClick, me));
|
view.tableTotalMenu.on('item:click', _.bind(me.onTotalMenuClick, me));
|
||||||
view.menuImgMacro.on('click', _.bind(me.onImgMacro, me));
|
view.menuImgMacro.on('click', _.bind(me.onImgMacro, me));
|
||||||
|
view.menuImgEditPoints.on('click', _.bind(me.onImgEditPoints, me));
|
||||||
} else {
|
} else {
|
||||||
view.menuViewCopy.on('click', _.bind(me.onCopyPaste, me));
|
view.menuViewCopy.on('click', _.bind(me.onCopyPaste, me));
|
||||||
view.menuViewUndo.on('click', _.bind(me.onUndo, me));
|
view.menuViewUndo.on('click', _.bind(me.onUndo, me));
|
||||||
|
@ -1049,6 +1050,10 @@ define([
|
||||||
})).show();
|
})).show();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onImgEditPoints: function(item) {
|
||||||
|
this.api && this.api.asc_editPointsGeometry();
|
||||||
|
},
|
||||||
|
|
||||||
onApiCoAuthoringDisconnect: function() {
|
onApiCoAuthoringDisconnect: function() {
|
||||||
this.permissions.isEdit = false;
|
this.permissions.isEdit = false;
|
||||||
},
|
},
|
||||||
|
@ -1926,6 +1931,11 @@ define([
|
||||||
|
|
||||||
documentHolder.menuImgMacro.setDisabled(isObjLocked);
|
documentHolder.menuImgMacro.setDisabled(isObjLocked);
|
||||||
|
|
||||||
|
var canEditPoints = this.api && this.api.asc_canEditGeometry();
|
||||||
|
documentHolder.menuImgEditPoints.setVisible(canEditPoints);
|
||||||
|
documentHolder.menuImgEditPointsSeparator.setVisible(canEditPoints);
|
||||||
|
canEditPoints && documentHolder.menuImgEditPoints.setDisabled(isObjLocked);
|
||||||
|
|
||||||
if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event);
|
if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event);
|
||||||
documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible() || documentHolder.mnuImgAdvanced.isVisible());
|
documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible() || documentHolder.mnuImgAdvanced.isVisible());
|
||||||
documentHolder.mnuSlicerSeparator.setVisible(documentHolder.mnuSlicerAdvanced.isVisible());
|
documentHolder.mnuSlicerSeparator.setVisible(documentHolder.mnuSlicerAdvanced.isVisible());
|
||||||
|
|
|
@ -821,6 +821,14 @@ define([
|
||||||
caption: me.textMacro
|
caption: me.textMacro
|
||||||
});
|
});
|
||||||
|
|
||||||
|
me.menuImgEditPoints = new Common.UI.MenuItem({
|
||||||
|
caption: me.textEditPoints
|
||||||
|
});
|
||||||
|
|
||||||
|
me.menuImgEditPointsSeparator = new Common.UI.MenuItem({
|
||||||
|
caption : '--'
|
||||||
|
});
|
||||||
|
|
||||||
this.imgMenu = new Common.UI.Menu({
|
this.imgMenu = new Common.UI.Menu({
|
||||||
cls: 'shifted-right',
|
cls: 'shifted-right',
|
||||||
items: [
|
items: [
|
||||||
|
@ -831,6 +839,8 @@ define([
|
||||||
me.menuSignatureEditSign,
|
me.menuSignatureEditSign,
|
||||||
me.menuSignatureEditSetup,
|
me.menuSignatureEditSetup,
|
||||||
me.menuEditSignSeparator,
|
me.menuEditSignSeparator,
|
||||||
|
me.menuImgEditPoints,
|
||||||
|
me.menuImgEditPointsSeparator,
|
||||||
me.menuImageArrange,
|
me.menuImageArrange,
|
||||||
me.menuImageAlign,
|
me.menuImageAlign,
|
||||||
me.menuImgRotate,
|
me.menuImgRotate,
|
||||||
|
@ -1250,7 +1260,8 @@ define([
|
||||||
txtCondFormat: 'Conditional Formatting',
|
txtCondFormat: 'Conditional Formatting',
|
||||||
textBullets: 'Bullets',
|
textBullets: 'Bullets',
|
||||||
textNumbering: 'Numbering',
|
textNumbering: 'Numbering',
|
||||||
textMacro: 'Assign Macro'
|
textMacro: 'Assign Macro',
|
||||||
|
textEditPoints: 'Edit Points'
|
||||||
|
|
||||||
}, SSE.Views.DocumentHolder || {}));
|
}, SSE.Views.DocumentHolder || {}));
|
||||||
});
|
});
|
|
@ -1969,6 +1969,7 @@
|
||||||
"SSE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
"SSE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
||||||
"SSE.Views.DocumentHolder.txtWidth": "Width",
|
"SSE.Views.DocumentHolder.txtWidth": "Width",
|
||||||
"SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
"SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||||
|
"SSE.Views.DocumentHolder.textEditPoints": "Edit Points",
|
||||||
"SSE.Views.FieldSettingsDialog.strLayout": "Layout",
|
"SSE.Views.FieldSettingsDialog.strLayout": "Layout",
|
||||||
"SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals",
|
"SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals",
|
||||||
"SSE.Views.FieldSettingsDialog.textReport": "Report Form",
|
"SSE.Views.FieldSettingsDialog.textReport": "Report Form",
|
||||||
|
|
Loading…
Reference in a new issue