diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js
index 26f7dd1aff..a2cb487c58 100644
--- a/apps/common/main/lib/util/utils.js
+++ b/apps/common/main/lib/util/utils.js
@@ -118,7 +118,8 @@ define([], function () {
Pivot: 10,
Cell: 11,
Slicer: 12,
- Form: 13
+ Form: 13,
+ Annotation: 14
},
importTextType = {
DRM: 0,
@@ -633,6 +634,39 @@ define([], function () {
return parseFloat((value / 25.4).toFixed(3));
}
return value;
+ },
+
+ fnRecalcToPt: function (value) {
+ // value in mm/cm/inch. need to convert to pt
+ if (value !== null && value !== undefined) {
+ switch (me.currentMetric) {
+ case me.c_MetricUnits.mm:
+ return value * 72.0 / 25.4;
+
+ case me.c_MetricUnits.cm:
+ return value * 10 * 72.0 / 25.4;
+
+ case me.c_MetricUnits.inch:
+ return value * 72.0;
+
+ case me.c_MetricUnits.pt:
+ return value;
+ }
+ }
+ return value;
+ },
+
+ fnRecalcFromPt: function (value) {
+ // value in pt. need to convert to mm/cm/inch
+ switch (me.currentMetric) {
+ case me.c_MetricUnits.mm:
+ return parseFloat((value * 25.4 / 72).toFixed(3));
+ case me.c_MetricUnits.cm:
+ return parseFloat((value * 25.4 / 72 / 10).toFixed(4));
+ case me.c_MetricUnits.inch:
+ return parseFloat((value / 72).toFixed(4));
+ }
+ return value;
}
}
})();
diff --git a/apps/pdfeditor/main/app/controller/RightMenu.js b/apps/pdfeditor/main/app/controller/RightMenu.js
index bb1a98598f..293edc2f48 100644
--- a/apps/pdfeditor/main/app/controller/RightMenu.js
+++ b/apps/pdfeditor/main/app/controller/RightMenu.js
@@ -91,6 +91,7 @@ define([
this._settings[Common.Utils.documentSettingsType.Chart] = {panelId: "id-chart-settings", panel: rightMenu.chartSettings, btn: rightMenu.btnChart, hidden: 1, locked: false};
// this._settings[Common.Utils.documentSettingsType.Signature] = {panelId: "id-signature-settings", panel: rightMenu.signatureSettings, btn: rightMenu.btnSignature, hidden: 1, props: {}, locked: false};
this._settings[Common.Utils.documentSettingsType.Form] = {panelId: "id-form-settings", panel: rightMenu.formSettings, btn: rightMenu.btnForm, hidden: 1, props: {}, locked: false};
+ this._settings[Common.Utils.documentSettingsType.Annotation] = {panelId: "id-annotation-settings", panel: rightMenu.annotationSettings, btn: rightMenu.btnAnnotation, hidden: 1, props: {}, locked: false};
},
setApi: function(api) {
@@ -253,6 +254,7 @@ define([
this.rightmenu.imageSettings.disableControls(disabled);
this.rightmenu.formSettings && this.rightmenu.formSettings.disableControls(disabled);
this.rightmenu.chartSettings.disableControls(disabled);
+ this.rightmenu.annotationSettings.disableControls(disabled);
// if (this.rightmenu.signatureSettings) {
// !allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
@@ -267,6 +269,7 @@ define([
this.rightmenu.btnTextArt.setDisabled(disabled);
this.rightmenu.btnForm && this.rightmenu.btnForm.setDisabled(disabled);
this.rightmenu.btnChart.setDisabled(disabled);
+ this.rightmenu.btnAnnotation.setDisabled(disabled);
this.rightmenu.setDisabledAllMoreMenuItems(disabled);
} else {
var selectedElements = this.api.getSelectedElements();
@@ -390,6 +393,8 @@ define([
return Common.Utils.documentSettingsType.Chart;
case Asc.c_oAscTypeSelectElement.Field:
return Common.Utils.documentSettingsType.Form;
+ case Asc.c_oAscTypeSelectElement.Annot:
+ return Common.Utils.documentSettingsType.Annotation;
}
},
diff --git a/apps/pdfeditor/main/app/template/AnnotationSettings.template b/apps/pdfeditor/main/app/template/AnnotationSettings.template
new file mode 100644
index 0000000000..08ea34b316
--- /dev/null
+++ b/apps/pdfeditor/main/app/template/AnnotationSettings.template
@@ -0,0 +1,74 @@
+
+
+
\ No newline at end of file
diff --git a/apps/pdfeditor/main/app/template/RightMenu.template b/apps/pdfeditor/main/app/template/RightMenu.template
index 3db9779d54..f6faa00695 100644
--- a/apps/pdfeditor/main/app/template/RightMenu.template
+++ b/apps/pdfeditor/main/app/template/RightMenu.template
@@ -10,6 +10,7 @@
+
\ No newline at end of file
diff --git a/apps/pdfeditor/main/app/view/AnnotationSettings.js b/apps/pdfeditor/main/app/view/AnnotationSettings.js
new file mode 100644
index 0000000000..aecfbfcede
--- /dev/null
+++ b/apps/pdfeditor/main/app/view/AnnotationSettings.js
@@ -0,0 +1,506 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2023
+ *
+ * This program is a free software product. You can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License (AGPL)
+ * version 3 as published by the Free Software Foundation. In accordance with
+ * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement
+ * of any third-party rights.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
+ * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * The interactive user interfaces in modified source and object code versions
+ * of the Program must display Appropriate Legal Notices, as required under
+ * Section 5 of the GNU AGPL version 3.
+ *
+ * Pursuant to Section 7(b) of the License you must retain the original Product
+ * logo when distributing the program. Pursuant to Section 7(e) we decline to
+ * grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as
+ * well as technical writing content are licensed under the terms of the
+ * Creative Commons Attribution-ShareAlike 4.0 International. See the License
+ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+ *
+ */
+/**
+ * AnnotationSettings.js
+ *
+ * Created on 26.01.2026
+ *
+ */
+
+define([
+ 'text!pdfeditor/main/app/template/AnnotationSettings.template',
+ 'jquery',
+ 'underscore',
+ 'backbone',
+ 'common/main/lib/component/Button'
+], function (menuTemplate, $, _, Backbone) {
+ 'use strict';
+
+ PDFE.Views.AnnotationSettings = Backbone.View.extend(_.extend({
+ el: '#id-annotation-settings',
+
+ // Compile our stats template
+ template: _.template(menuTemplate),
+
+ // Delegated events for creating new items, and clearing completed ones.
+ events: {
+ },
+
+ options: {
+ alias: 'AnnotationSettings'
+ },
+
+ initialize: function () {
+ this._initSettings = true;
+ this._state = {};
+ this._originalProps = null;
+
+ this.spinners = [];
+
+ this.render();
+ },
+
+ render: function () {
+ var el = $(this.el);
+ el.html(this.template({
+ scope: this
+ }));
+ },
+
+ setApi: function(api) {
+ this.api = api;
+ if (this.api) {
+
+ }
+ return this;
+ },
+
+ setMode: function(mode) {
+ this.mode = mode;
+ },
+
+ createDelayedControls: function() {
+ const $markup = this.$el || $(this.el);
+ const colorConfig = Common.UI.simpleColorsConfig;
+
+ this.btnBorderColor = new Common.UI.ColorButton({
+ parentEl: $markup.findById('#annotation-color-btn'),
+ colors: colorConfig.colors,
+ dynamiccolors: colorConfig.dynamiccolors,
+ themecolors: colorConfig.themecolors,
+ effects: colorConfig.effects,
+ columns: colorConfig.columns,
+ paletteCls: colorConfig.cls,
+ paletteWidth: colorConfig.paletteWidth,
+ dataHint: '1',
+ colorHints: false,
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big'
+ });
+ this.mnuBorderColorPicker = this.btnBorderColor.getPicker();
+ this.btnBorderColor.on('color:select', this.onBorderColorSelect.bind(this));
+ // this.lockedControls.push(this.btnColor);
+
+ this.cmbBorderStyle = new Common.UI.ComboBorderType({
+ el: $markup.findById('#annotation-combo-line-style'),
+ menuStyle: 'min-width: 100%;',
+ data: [
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.solid, imgId: 'annotation-solid' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.dash1, imgId: 'annotation-dots' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.dash2, imgId: 'annotation-dots-dense' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.dash3, imgId: 'annotation-dashes' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.dash4, imgId: 'annotation-dashes-dense' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.dash5, imgId: 'annotation-dash-dot' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.dash6, imgId: 'annotation-dash-dot-wide' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.cloud1, imgId: 'annotation-wave' },
+ { value: AscPDF.ANNOT_COMPLEX_BORDER_TYPES.cloud2, imgId: 'annotation-wave' }
+ ],
+ dataHint: '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big',
+ ariaLabel: '123' //TODO: Добавить
+ });
+ this.cmbBorderStyle.on('selected', this.onCmbBorderStyleChange.bind(this));
+ // this.lockedControls.push(this.cmbLineStyle);
+
+ this.numBorderWidth = new Common.UI.MetricSpinner({
+ el: $('#annotation-spin-border-width'),
+ step: 1,
+ width: '100%',
+ value: '1 pt',
+ defaultUnit : "pt",
+ maxValue: 12,
+ minValue: 1,
+ dataHint: '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big',
+ ariaLabel: this.strTransparency //TODO: Добавить label
+ });
+ this.spinners.push(this.numBorderWidth);
+ this.numBorderWidth.on('change', _.bind(this.onNumBorderWidthChange, this));
+ this.numBorderWidth.on('inputleave', function(){ this.fireEvent('editcomplete', this);});
+ // this.lockedControls.push(this.numTransparency);
+
+ this.btnBackgroundColor = new Common.UI.ColorButton({
+ parentEl: $markup.findById('#annotation-background-color-btn'),
+ colors: colorConfig.colors,
+ dynamiccolors: colorConfig.dynamiccolors,
+ themecolors: colorConfig.themecolors,
+ effects: colorConfig.effects,
+ columns: colorConfig.columns,
+ paletteCls: colorConfig.cls,
+ paletteWidth: colorConfig.paletteWidth,
+ dataHint: '1',
+ colorHints: false,
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big'
+ });
+ this.mnuBackgroundColorPicker = this.btnBackgroundColor.getPicker();
+ this.btnBackgroundColor.on('color:select', this.onBackgroundColorSelect.bind(this));
+ // this.lockedControls.push(this.btnColor);
+ // this.btnColor.on('color:select', this.onColorPickerSelect.bind(this));
+
+
+ this.sldrOpacity = new Common.UI.SingleSlider({
+ el: $('#annotation-slider-opacity'),
+ width: 75,
+ minValue: 0,
+ maxValue: 100,
+ value: 100
+ });
+ this.sldrOpacity.on('change', _.bind(this.onOpacityChange, this));
+ this.sldrOpacity.on('changecomplete', _.bind(this.onOpacityChangeComplete, this));
+ // this.lockedControls.push(this.sldrTransparency);
+
+ this.lblOpacityStart = $(this.el).find('#annotation-lbl-opacity-start');
+ this.lblOpacityEnd = $(this.el).find('#annotation-lbl-opacity-end');
+
+ this.numOpacity = new Common.UI.MetricSpinner({
+ el: $('#annotation-spin-opacity'),
+ step: 1,
+ width: 62,
+ value: '100 %',
+ defaultUnit : "%",
+ maxValue: 100,
+ minValue: 0,
+ dataHint: '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big',
+ ariaLabel: this.strTransparency //TODO: Добавить label
+ });
+ this.numOpacity.on('change', _.bind(this.onNumOpacityChange, this));
+ this.numOpacity.on('inputleave', function(){ this.fireEvent('editcomplete', this);});
+ // this.lockedControls.push(this.numTransparency);
+
+
+ const lineStyleOptions = [
+ { displayValue: this.txtNone, value: AscPDF.LINE_END_TYPE.None },
+ { displayValue: this.txtOpen, value: AscPDF.LINE_END_TYPE.OpenArrow },
+ { displayValue: this.txtClosed, value: AscPDF.LINE_END_TYPE.ClosedArrow },
+ { displayValue: this.txtOpenReverse, value: AscPDF.LINE_END_TYPE.ROpenArrow },
+ { displayValue: this.txtClosedReverse, value: AscPDF.LINE_END_TYPE.RClosedArrow },
+ { displayValue: this.txtButt, value: AscPDF.LINE_END_TYPE.Butt },
+ { displayValue: this.txtDiamond, value: AscPDF.LINE_END_TYPE.Diamond },
+ { displayValue: this.txtCircle, value: AscPDF.LINE_END_TYPE.Circle },
+ { displayValue: this.txtSquare, value: AscPDF.LINE_END_TYPE.Square },
+ { displayValue: this.txtSlash, value: AscPDF.LINE_END_TYPE.Slash }
+ ];
+ this.cmbLineStart = new Common.UI.ComboBox({
+ el: $markup.findById('#annotation-combo-line-start'),
+ cls: 'input-group-nr',
+ menuStyle: 'min-width: 100%;',
+ editable: false,
+ data: lineStyleOptions,
+ dataHint: '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big'
+ });
+ this.cmbLineStart.on('selected', this.onLineStartChanged.bind(this));
+
+ this.cmbLineEnd = new Common.UI.ComboBox({
+ el: $markup.findById('#annotation-combo-line-end'),
+ cls: 'input-group-nr',
+ menuStyle: 'min-width: 100%;',
+ editable: false,
+ data: lineStyleOptions,
+ dataHint: '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'big'
+ });
+ this.cmbLineEnd.on('selected', this.onLineEndChanged.bind(this));
+ },
+
+ updateMetricUnit: function() {
+ if (this.spinners) {
+ for (var i=0; i 0.001 ||
+ Math.abs(this.numBorderWidth.getNumberValue() - value) > 0.001 ||
+ (this._state.BorderWidth === null || value === null) &&
+ (this._state.BorderWidth !== value || this.numBorderWidth.getNumberValue() !== value)
+ ) {
+ if (value !== undefined) {
+ this.numBorderWidth.setValue(
+ (value !== null) ? Common.Utils.Metric.fnRecalcFromPt(value) : '', true
+ );
+ }
+ this._state.BorderWidth = value;
+ }
+ $formValue.show();
+ } else {
+ $formValue.hide();
+ }
+
+ //Border style
+ $formValue = getFormField(this.cmbBorderStyle);
+ if(annotProps?.asc_getBorderStyle) {
+ value = annotProps.asc_getBorderStyle();
+ if (this._state.BorderStyle !== value) {
+ this.cmbBorderStyle.setValue(value, '');
+ this._state.BorderStyle = value;
+ }
+ $formValue.show();
+ } else {
+ $formValue.hide();
+ }
+
+ //Line start
+ $formValue = getFormField(this.cmbLineStart);
+ if(annotProps?.asc_getLineStart) {
+ value = annotProps.asc_getLineStart();
+ if (this._state.LineStart !== value) {
+ this.cmbLineStart.setValue(value, '');
+ this._state.LineStart = value;
+ }
+ $formValue.show();
+ } else {
+ $formValue.hide();
+ }
+
+ //Line end
+ $formValue = getFormField(this.cmbLineEnd);
+ if(annotProps?.asc_getLineEnd) {
+ value = annotProps.asc_getLineEnd();
+ if (this._state.LineEnd !== value) {
+ this.cmbLineEnd.setValue(value, '');
+ this._state.LineEnd = value;
+ }
+ $formValue.show();
+ } else {
+ $formValue.hide();
+ }
+
+ // Opacity
+ value = props.asc_getOpacity();
+ if (
+ Math.abs(this._state.Opacity - value) > 0.001 ||
+ Math.abs(this.numOpacity.getNumberValue() - value) > 0.001 ||
+ (this._state.Opacity === null || value === null) &&
+ (this._state.Opacity !== value || this.numOpacity.getNumberValue() !== value)
+ ) {
+ if (value !== undefined) {
+ this.sldrOpacity.setValue((value === null) ? 100 : value * 100, true);
+ this.numOpacity.setValue(this.sldrOpacity.getValue(), true);
+ }
+ this._state.Opacity = value;
+ }
+
+ this.showHideFormGroups();
+ }
+ },
+
+ setLocked: function (locked) {
+ this._locked = locked;
+ },
+
+ showHideFormGroups: function() {
+ (this.$el || $(this.el)).find('.form-group').each(function (index, group) {
+ $(group).show();
+ const hasVisibleFields = $(group).find('.form-field:visible').length > 0;
+ if(!hasVisibleFields) {
+ $(group).hide();
+ }
+ });
+ },
+
+ //Event handlers
+ onBorderColorSelect: function(btn, color) {
+ // this.BorderColor = color;
+ // this._state.BorderColor = undefined;
+
+ if (this.api) {
+ if (color == 'transparent') {
+ this.api.SetAnnotStrokeColor();
+ } else {
+ const clr = Common.Utils.ThemeColor.getRgbColor(color);
+ this.api.SetAnnotStrokeColor(clr.get_r(), clr.get_g(), clr.get_b());
+ }
+ this.fireEvent('editcomplete', this);
+ }
+ },
+
+ onNumBorderWidthChange: function(field) {
+ if (this.api) {
+ const value = field.getNumberValue();
+ this._state.BorderWidth = undefined;
+ this.api.SetAnnotStrokeWidth(Common.Utils.Metric.fnRecalcToPt(value));
+ }
+ this.fireEvent('editcomplete', this);
+ },
+
+ onCmbBorderStyleChange: function(cmb, record) {
+ if (this.api) {
+ this._state.BorderStyle = undefined;
+ this.api.SetAnnotStrokeStyle(record.value);
+ }
+ this.fireEvent('editcomplete', this);
+ },
+
+ onBackgroundColorSelect: function(btn, color) {
+ // this.BorderColor = color;
+ this._state.BorderColor = undefined;
+
+ if (this.api) {
+ if (color == 'transparent') {
+ this.api.SetAnnotFillColor();
+ } else {
+ const clr = Common.Utils.ThemeColor.getRgbColor(color);
+ this.api.SetAnnotFillColor(clr.get_r(), clr.get_g(), clr.get_b());
+ }
+ this.fireEvent('editcomplete', this);
+ }
+ },
+
+ onNumOpacityChange: function(field, newValue, oldValue, eOpts) {
+ this.sldrOpacity.setValue(field.getNumberValue(), true);
+ if (this.api) {
+ const num = field.getNumberValue();
+ this.api.SetAnnotOpacity(num);
+ }
+ },
+ onOpacityChange: function(field, newValue, oldValue) {
+ this._sliderOpacityChanged = newValue;
+ this.numOpacity.setValue(newValue, true);
+
+ if (this._sendUndoPoint) {
+ this.api.setStartPointHistory();
+ this._sendUndoPoint = false;
+ this.updateSliderOpacity = setInterval(_.bind(this._opacityApplyFunc, this), 100);
+ }
+ },
+ onOpacityChangeComplete: function(field, newValue, oldValue) {
+ clearInterval(this.updateSliderOpacity);
+ this._sliderOpacityChanged = newValue;
+ if (!this._sendUndoPoint) {
+ this.api.setEndPointHistory();
+ this._opacityApplyFunc();
+ }
+ this._sendUndoPoint = true;
+ },
+ _opacityApplyFunc: function() {
+ if (this._sliderOpacityChanged !== undefined) {
+ this.api.SetAnnotOpacity(this._sliderOpacityChanged);
+ this._sliderOpacityChanged = undefined;
+ }
+ },
+
+ onLineStartChanged: function(combo, record) {
+ if (this.api) {
+ this.api.SetAnnotLineStart(record.value);
+ this.fireEvent('editcomplete', this);
+ }
+ },
+
+ onLineEndChanged: function(combo, record) {
+ if (this.api ) {
+ this.api.SetAnnotLineEnd(record.value);
+ this.fireEvent('editcomplete', this);
+ }
+ },
+
+ // TODO: Move to en.js
+ txtNone: 'None',
+ txtOpen: 'Open',
+ txtClosed: 'Closed',
+ txtOpenReverse: 'Open (Reverse)',
+ txtClosedReverse: 'Closed (Reverse)',
+ txtButt: 'Butt',
+ txtDiamond: 'Diamond',
+ txtCircle: 'Circle', //TODO: Вомзожно назвать Round (Как в adobe)
+ txtSquare: 'Square',
+ txtSlash: 'Slash'
+
+ }, PDFE.Views.AnnotationSettings || {}));
+});
\ No newline at end of file
diff --git a/apps/pdfeditor/main/app/view/RightMenu.js b/apps/pdfeditor/main/app/view/RightMenu.js
index c36ee2832d..724f4dd032 100644
--- a/apps/pdfeditor/main/app/view/RightMenu.js
+++ b/apps/pdfeditor/main/app/view/RightMenu.js
@@ -55,6 +55,7 @@ define([
'pdfeditor/main/app/view/TableSettings',
'pdfeditor/main/app/view/ShapeSettings',
'pdfeditor/main/app/view/TextArtSettings',
+ 'pdfeditor/main/app/view/AnnotationSettings',
// 'pdfeditor/main/app/view/SignatureSettings',
'common/main/lib/component/Scroller',
'common/main/lib/component/ListView',
@@ -130,6 +131,16 @@ define([
allowMouseEventsOnDisabled: true
});
+ this.btnAnnotation = new Common.UI.Button({
+ hint: this.txtAnnotationSettings,
+ asctype: Common.Utils.documentSettingsType.Annotation,
+ enableToggle: true,
+ disabled: true,
+ iconCls: 'btn-menu-textart',
+ toggleGroup: 'tabpanelbtnsGroup',
+ allowMouseEventsOnDisabled: true
+ });
+
this._settings = [];
this._settings[Common.Utils.documentSettingsType.Paragraph] = {panel: "id-paragraph-settings", btn: this.btnText};
this._settings[Common.Utils.documentSettingsType.Table] = {panel: "id-table-settings", btn: this.btnTable};
@@ -137,6 +148,7 @@ define([
this._settings[Common.Utils.documentSettingsType.Shape] = {panel: "id-shape-settings", btn: this.btnShape};
this._settings[Common.Utils.documentSettingsType.Chart] = {panel: "id-chart-settings", btn: this.btnChart};
this._settings[Common.Utils.documentSettingsType.TextArt] = {panel: "id-textart-settings", btn: this.btnTextArt};
+ this._settings[Common.Utils.documentSettingsType.Annotation] = {panel: "id-annotation-settings", btn: this.btnAnnotation};
return this;
},
@@ -168,12 +180,13 @@ define([
Common.UI.SideMenu.prototype.render.call(this);
this.btnMore.menu.menuAlign = 'tr-tl';
- this.btnText.setElement($('#id-right-menu-text'), false); this.btnText.render();
- this.btnTable.setElement($('#id-right-menu-table'), false); this.btnTable.render();
- this.btnImage.setElement($('#id-right-menu-image'), false); this.btnImage.render();
- this.btnChart.setElement($('#id-right-menu-chart'), false); this.btnChart.render();
- this.btnShape.setElement($('#id-right-menu-shape'), false); this.btnShape.render();
- this.btnTextArt.setElement($('#id-right-menu-textart'), false); this.btnTextArt.render();
+ this.btnText.setElement($('#id-right-menu-text'), false); this.btnText.render();
+ this.btnTable.setElement($('#id-right-menu-table'), false); this.btnTable.render();
+ this.btnImage.setElement($('#id-right-menu-image'), false); this.btnImage.render();
+ this.btnChart.setElement($('#id-right-menu-chart'), false); this.btnChart.render();
+ this.btnShape.setElement($('#id-right-menu-shape'), false); this.btnShape.render();
+ this.btnTextArt.setElement($('#id-right-menu-textart'), false); this.btnTextArt.render();
+ this.btnAnnotation.setElement($('#id-right-menu-annotation'), false); this.btnAnnotation.render();
this.btnText.on('click', _.bind(this.onBtnMenuClick, this));
this.btnTable.on('click', _.bind(this.onBtnMenuClick, this));
@@ -181,6 +194,7 @@ define([
this.btnChart.on('click', _.bind(this.onBtnMenuClick, this));
this.btnShape.on('click', _.bind(this.onBtnMenuClick, this));
this.btnTextArt.on('click', _.bind(this.onBtnMenuClick, this));
+ this.btnAnnotation.on('click', _.bind(this.onBtnMenuClick, this));
this.paragraphSettings = new PDFE.Views.ParagraphSettings();
this.imageSettings = new PDFE.Views.ImageSettings();
@@ -188,6 +202,7 @@ define([
this.tableSettings = new PDFE.Views.TableSettings();
this.shapeSettings = new PDFE.Views.ShapeSettings();
this.textartSettings = new PDFE.Views.TextArtSettings();
+ this.annotationSettings = new PDFE.Views.AnnotationSettings();
// if (mode && mode.isSignatureSupport) {
// this.btnSignature = new Common.UI.Button({
@@ -247,6 +262,7 @@ define([
this.tableSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this));
this.shapeSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
this.textartSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
+ this.annotationSettings.setApi(api).on('editcomplete', _.bind( fire, this)).on('eyedropper', _.bind(_isEyedropperStart, this)).on('updatescroller', _updateScroller);
// if (this.signatureSettings) this.signatureSettings.setApi(api).on('editcomplete', _.bind( fire, this));
if (this.formSettings) this.formSettings.setApi(api).on('editcomplete', fire).on('updatescroller', _updateScroller);
},
@@ -256,6 +272,7 @@ define([
this.shapeSettings && this.shapeSettings.setMode(mode);
this.formSettings && this.formSettings.setMode(mode);
this.chartSettings && this.chartSettings.setMode(mode);
+ this.annotationSettings && this.annotationSettings.setMode(mode);
},
onBtnMenuClick: function(btn, e) {
@@ -338,7 +355,7 @@ define([
},
setButtons: function () {
- var allButtons = [this.btnShape, this.btnImage, this.btnText, this.btnTable, this.btnTextArt, this.btnChart/*, this.btnSignature*/, this.btnForm];
+ var allButtons = [this.btnShape, this.btnImage, this.btnText, this.btnTable, this.btnTextArt, this.btnChart/*, this.btnSignature*/, this.btnForm, this.btnAnnotation];
Common.UI.SideMenu.prototype.setButtons.apply(this, [allButtons]);
},
@@ -361,7 +378,8 @@ define([
txtTextArtSettings: 'Text Art Settings',
txtChartSettings: 'Chart Settings',
txtSignatureSettings: 'Signature Settings',
- ariaRightMenu: 'Right menu',
- txtFormSettings: 'Form Settings'
+ ariaRightMenu: 'Right menu',
+ txtFormSettings: 'Form Settings',
+ txtAnnotationSettings: 'Annotation Settings'
}, PDFE.Views.RightMenu || {}));
});
\ No newline at end of file
diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json
index 89e28f2f61..a9c432d5f0 100644
--- a/apps/pdfeditor/main/locale/en.json
+++ b/apps/pdfeditor/main/locale/en.json
@@ -3032,5 +3032,14 @@
"PDFE.Views.ViewTab.tipFitToPage": "Fit to page",
"PDFE.Views.ViewTab.tipFitToWidth": "Fit to width",
"PDFE.Views.ViewTab.tipHeadings": "Headings",
- "PDFE.Views.ViewTab.tipInterfaceTheme": "Interface theme"
+ "PDFE.Views.ViewTab.tipInterfaceTheme": "Interface theme",
+ "PDFE.Views.AnnotationSettings.textBorder": "Border",
+ "PDFE.Views.AnnotationSettings.textColor": "Color",
+ "PDFE.Views.AnnotationSettings.textThickness": "Thickness",
+ "PDFE.Views.AnnotationSettings.textStyle": "Style",
+ "PDFE.Views.AnnotationSettings.textBackgroundColor": "Background color",
+ "PDFE.Views.AnnotationSettings.textOpacity": "Opacity",
+ "PDFE.Views.AnnotationSettings.textLine": "Line",
+ "PDFE.Views.AnnotationSettings.textStart": "Start",
+ "PDFE.Views.AnnotationSettings.textEnd": "End"
}
\ No newline at end of file