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