devexpress-richedit 24.2.8-build-25149-0115 → 25.1.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +1 -1
- package/dist/dx.richedit.d.ts +11 -3
- package/dist/dx.richedit.js +2494 -2002
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/_constants.d.ts +1 -0
- package/lib/client/_constants.js +3 -0
- package/lib/client/bars/rich-edit-ribbon/ribbon-items-data.js +11 -0
- package/lib/client/client-rich-edit.js +5 -3
- package/lib/client/commands/commands.js +12 -0
- package/lib/client/i-rich-constructor-settings.d.ts +2 -0
- package/lib/client/model-api/api-utils/parameter-checker.d.ts +1 -1
- package/lib/client/model-api/api-utils/parameter-checker.js +2 -2
- package/lib/client/public/commands/enum.d.ts +3 -1
- package/lib/client/public/commands/enum.js +2 -0
- package/lib/client/public/options.d.ts +2 -0
- package/lib/client/public/options.js +2 -0
- package/lib/client/public/rich-edit.d.ts +4 -0
- package/lib/client/public/rich-edit.js +21 -0
- package/lib/client/ribbon/i-toolbar-item-options.d.ts +1 -1
- package/lib/client/settings.js +4 -0
- package/lib/client/utils/focus-helper.js +5 -22
- package/lib/common/canvas/canvas-manager.d.ts +2 -0
- package/lib/common/canvas/canvas-manager.js +34 -20
- package/lib/common/canvas/canvas-scroll-info.d.ts +6 -3
- package/lib/common/canvas/canvas-scroll-info.js +9 -4
- package/lib/common/canvas/canvas-scroll-manager.d.ts +4 -1
- package/lib/common/canvas/canvas-scroll-manager.js +28 -20
- package/lib/common/canvas/canvas-size-info.d.ts +3 -2
- package/lib/common/canvas/canvas-size-info.js +4 -6
- package/lib/common/canvas/renderes/canvas-listener/print-layout-view-canvas-listener.js +2 -2
- package/lib/common/canvas/renderes/common/document-renderer.d.ts +5 -2
- package/lib/common/canvas/renderes/common/document-renderer.js +5 -0
- package/lib/common/canvas/renderes/view-manager.d.ts +9 -1
- package/lib/common/canvas/renderes/view-manager.js +27 -2
- package/lib/common/commands/client-command.d.ts +3 -1
- package/lib/common/commands/client-command.js +2 -0
- package/lib/common/commands/command-manager.js +4 -0
- package/lib/common/commands/layout/apply-style-command.d.ts +2 -2
- package/lib/common/commands/layout/apply-style-command.js +4 -3
- package/lib/common/commands/layout/change-zoom-level-command.d.ts +10 -0
- package/lib/common/commands/layout/change-zoom-level-command.js +30 -0
- package/lib/common/commands/layout/toggle-allow-zoom-command.d.ts +7 -0
- package/lib/common/commands/layout/toggle-allow-zoom-command.js +17 -0
- package/lib/common/commands/ruler/ruler-table-column-separators-command.d.ts +9 -2
- package/lib/common/commands/ruler/ruler-table-column-separators-command.js +24 -15
- package/lib/common/commands/toc/set-paragraph-level-command.js +1 -1
- package/lib/common/formats/rtf/import/table/normalization/apply-use-values.d.ts +6 -0
- package/lib/common/formats/rtf/import/table/normalization/apply-use-values.js +90 -0
- package/lib/common/formats/rtf/import/table/table-converter.js +7 -2
- package/lib/common/input-controller.js +4 -0
- package/lib/common/interfaces/i-zoom-level-holder.d.ts +3 -0
- package/lib/common/interfaces/i-zoom-level-holder.js +1 -0
- package/lib/common/layout/document-layout.d.ts +2 -0
- package/lib/common/layout/document-layout.js +4 -0
- package/lib/common/layout-formatter/formatter/base-formatter.js +2 -1
- package/lib/common/model/borders/border-info.js +1 -1
- package/lib/common/model/changes/change.d.ts +2 -1
- package/lib/common/model/changes/enums.d.ts +2 -1
- package/lib/common/model/changes/enums.js +1 -0
- package/lib/common/model/changes/model/zoom-level.d.ts +8 -0
- package/lib/common/model/changes/model/zoom-level.js +8 -0
- package/lib/common/model/character/character-properties.d.ts +1 -1
- package/lib/common/model/character/character-properties.js +2 -14
- package/lib/common/model/creator/creator.js +6 -0
- package/lib/common/model/history/items/character-properties-history-items.d.ts +1 -2
- package/lib/common/model/history/items/character-properties-history-items.js +2 -3
- package/lib/common/model/json/enums/json-control-enums.d.ts +2 -1
- package/lib/common/model/json/enums/json-control-enums.js +1 -0
- package/lib/common/model/json/exporters/json-control-options-converter.js +2 -0
- package/lib/common/model/json/importers/json-importer.js +2 -0
- package/lib/common/model/manipulators/character-properties-manipulator.js +2 -2
- package/lib/common/model/manipulators/i-properties-manipulator.d.ts +1 -1
- package/lib/common/model/manipulators/model-manipulator.d.ts +2 -1
- package/lib/common/model/manipulators/model-manipulator.js +4 -0
- package/lib/common/model/options/control.d.ts +1 -0
- package/lib/common/model/options/control.js +1 -0
- package/lib/common/model/paragraph/paragraph-style.d.ts +9 -4
- package/lib/common/model/paragraph/paragraph-style.js +20 -14
- package/lib/common/model/rich-utils.d.ts +2 -0
- package/lib/common/model/rich-utils.js +2 -0
- package/lib/common/mouse-handler/resize-box-helper.js +2 -2
- package/lib/common/rich-edit-core.d.ts +0 -1
- package/lib/common/rich-edit-core.js +17 -22
- package/lib/common/ui/ruler/controls/base.d.ts +7 -2
- package/lib/common/ui/ruler/controls/base.js +11 -3
- package/lib/common/ui/ruler/controls/column.d.ts +17 -5
- package/lib/common/ui/ruler/controls/column.js +37 -21
- package/lib/common/ui/ruler/controls/divisions.d.ts +18 -5
- package/lib/common/ui/ruler/controls/divisions.js +41 -13
- package/lib/common/ui/ruler/controls/indent/first-line.js +2 -2
- package/lib/common/ui/ruler/controls/indent/left.js +2 -2
- package/lib/common/ui/ruler/controls/indent/right.js +2 -2
- package/lib/common/ui/ruler/controls/margin/base.js +3 -3
- package/lib/common/ui/ruler/controls/owner.d.ts +2 -0
- package/lib/common/ui/ruler/controls/owner.js +4 -0
- package/lib/common/ui/ruler/controls/ruler.js +8 -4
- package/lib/common/ui/ruler/controls/tab/tab-info.d.ts +15 -0
- package/lib/common/ui/ruler/controls/tab/tab-info.js +19 -0
- package/lib/common/ui/ruler/controls/tab/tab.d.ts +3 -3
- package/lib/common/ui/ruler/controls/tab/tab.js +10 -11
- package/lib/common/ui/ruler/controls/table.js +5 -4
- package/lib/common/ui/ruler/controls/vertical-line.js +1 -2
- package/lib/common/ui/ruler/controls/zoomable-value.d.ts +8 -0
- package/lib/common/ui/ruler/controls/zoomable-value.js +15 -0
- package/lib/common/ui/ruler/manager.d.ts +6 -2
- package/lib/common/ui/ruler/manager.js +13 -4
- package/lib/common/ui/ruler/model-data.d.ts +1 -0
- package/lib/common/ui/ruler/model-data.js +1 -0
- package/lib/common/ui/ruler/ruler.js +2 -0
- package/lib/common/utils/mixed-size.d.ts +27 -0
- package/lib/common/utils/mixed-size.js +91 -0
- package/lib/common/view-settings/views-settings.d.ts +2 -0
- package/lib/common/view-settings/views-settings.js +3 -0
- package/package.json +7 -7
@@ -708,6 +708,7 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
708
708
|
}
|
709
709
|
startInputIME() {
|
710
710
|
this.inputElement.style.position = "absolute";
|
711
|
+
this.inputElement.style.zoom = this.control.viewManager.zoomLevel;
|
711
712
|
const lastSelectedIntervalStartPosition = this.control.selection.lastSelectedInterval.start;
|
712
713
|
const subDocument = this.control.selection.activeSubDocument;
|
713
714
|
const layoutPosition = subDocument.isMain() ?
|
@@ -721,6 +722,9 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
721
722
|
const propChar = HtmlConverter.getSizeSignificantRules(this.control.inputPosition.getMergedCharacterPropertiesRaw()).join(";");
|
722
723
|
this.editableDocument.body.style.cssText = "padding: 0px; margin: 0px; overflow: hidden; color: transparent; " + propChar;
|
723
724
|
this.editableDocument.body.style.textIndent = currentTextIndent;
|
725
|
+
if (Browser.Firefox) {
|
726
|
+
this.editableDocument.body.style.zoom = this.control.viewManager.zoomLevel;
|
727
|
+
}
|
724
728
|
let layoutX = layoutPosition.getLayoutX(this.control.measurer, DocumentLayoutDetailsLevel.Row);
|
725
729
|
const layoutPoint = new LayoutPoint(layoutPosition.pageIndex, layoutX, layoutPosition.getLayoutY(DocumentLayoutDetailsLevel.Row));
|
726
730
|
const pageElement = this.control.viewManager.cache[layoutPoint.pageIndex].page;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -2,6 +2,7 @@ import { DocumentModel } from '../model/document-model';
|
|
2
2
|
import { PositionManager } from '../model/position/position-manager';
|
3
3
|
import { LayoutAnchoredObjectBox } from './main-structures/layout-boxes/layout-anchored-object-box';
|
4
4
|
import { LayoutPage } from './main-structures/layout-page';
|
5
|
+
import { CanvasSizeInfo } from '../canvas/canvas-size-info';
|
5
6
|
import { Grid } from '../layout-formatter/table/grid-engine/grid';
|
6
7
|
import { Table } from '../model/tables/main-structures/table';
|
7
8
|
export declare class ModelPositionHolder {
|
@@ -33,4 +34,5 @@ export declare class DocumentLayout {
|
|
33
34
|
getLastValidPage(): LayoutPage;
|
34
35
|
isPageValid(pageIndex: number): boolean;
|
35
36
|
getPageBySubDocumentId(subDocumentId: number): LayoutPage;
|
37
|
+
findPageIndexByOffsetY(offsetY: number, sizeInfo: CanvasSizeInfo): number;
|
36
38
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { NumberMapUtils } from '@devexpress/utils/lib/utils/map/number';
|
2
2
|
import { ColorHelper } from '../model/color/color';
|
3
|
+
import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
3
4
|
export class ModelPositionHolder {
|
4
5
|
constructor(pos, posManager) {
|
5
6
|
this.pos = posManager.registerPosition(pos);
|
@@ -64,4 +65,7 @@ export class DocumentLayout {
|
|
64
65
|
getPageBySubDocumentId(subDocumentId) {
|
65
66
|
return this.pages.find((page) => !!page.mainSubDocumentPageAreas[subDocumentId] || !!page.otherPageAreas[subDocumentId]);
|
66
67
|
}
|
68
|
+
findPageIndexByOffsetY(offsetY, sizeInfo) {
|
69
|
+
return Math.max(0, SearchUtils.normedInterpolationIndexOf(this.pages, (p) => sizeInfo.getPageOffsetY(p), offsetY));
|
70
|
+
}
|
67
71
|
}
|
@@ -233,7 +233,8 @@ export class BaseFormatter {
|
|
233
233
|
const minPageContentHeight = bottomPosition + margins.bottom;
|
234
234
|
const minVisibleAreaHeight = minPageContentHeight +
|
235
235
|
pageInfo.topMargin + pageInfo.topPageBorderWidth + pageInfo.bottomPageBorderWidth + pageInfo.bottomMargin;
|
236
|
-
const
|
236
|
+
const zoomLevel = this.manager.innerClientProperties.viewsSettings.zoomLevel;
|
237
|
+
const diff = Math.floor(Math.max(0, this.manager.controlHeightProvider.getVisibleAreaHeight(false) / zoomLevel - minVisibleAreaHeight));
|
237
238
|
const finalPageHeight = minPageContentHeight + diff;
|
238
239
|
const columnHeight = finalPageHeight - margins.vertical;
|
239
240
|
this.layoutPosition.column.height = columnHeight;
|
@@ -5,7 +5,7 @@ import { BorderLineStyle } from './enums';
|
|
5
5
|
import { LayoutBorder } from './layout-border';
|
6
6
|
export class BorderInfo {
|
7
7
|
constructor() {
|
8
|
-
this.style = BorderLineStyle.
|
8
|
+
this.style = BorderLineStyle.None;
|
9
9
|
this.color = ColorModelInfoCache.defaultItem;
|
10
10
|
this.width = 0;
|
11
11
|
this.offset = 0;
|
@@ -17,6 +17,7 @@ import { LoadFontInfoModelChange } from './model/load-font';
|
|
17
17
|
import { PageColorModelChange } from './model/page-color';
|
18
18
|
import { SectionsFormattingChangedModelChange } from './model/section-formatting-changed';
|
19
19
|
import { SectionMergedSubDocumentChange } from './model/section-merged';
|
20
|
+
import { ZoomLevelChange } from './model/zoom-level';
|
20
21
|
import { AnchorInfoPropertyChangedSubDocumentChange } from './sub-document/anchor/anchor-info-property-changed';
|
21
22
|
import { AnchoredTextBoxPropertiesChangedSubDocumentChange } from './sub-document/anchor/anchored-text-box-properties-changed';
|
22
23
|
import { AnchoredTextBoxSizeChangedSubDocumentChange } from './sub-document/anchor/anchored-text-box-size-changed';
|
@@ -66,4 +67,4 @@ import { ParagraphMergedSubDocumentChange } from './sub-document/text/paragraph-
|
|
66
67
|
import { SectionInsertedSubDocumentChange } from './sub-document/text/section-inserted';
|
67
68
|
import { SimpleRunInsertedSubDocumentChange } from './sub-document/text/simple-run-inserted';
|
68
69
|
import { TextBufferChangedSubDocumentChange } from './sub-document/text/text-buffer-changed';
|
69
|
-
export type ModelChange = PageColorModelChange | DefaultTabWidthModelChange | DifferentOddAndEvenPagesModelChange | HeaderFooterCreatedModelChange | HeaderFooterIndexChangedModelChange | LoadFontInfoModelChange | SectionsFormattingChangedModelChange | CreateStyleLinkModelChange | DeleteStyleLinkModelChange | DocumentProtectionChangedModelChange | AbstractNumberingListAddedModelChange | AbstractNumberingListDeletedModelChange | NumberingListAddedModelChange | NumberingListDeletedModelChange | ListLevelPropertyChangedModelChange | ListLevelParagraphPropertyChangedModelChange | ListLevelCharacterPropertyChangedModelChange | IOverrideListLevelChangedModelChange | BookmarkCreatedSubDocumentChange | BookmarkDeletedSubDocumentChange | TabInsertedSubDocumentChange | TabDeletedSubDocumentChange | LoadPicturesInfoSubDocumentChange | InlinePictureInsertedSubDocumentChange | InlinePicturesUpdatedSubDocumentChange | AnchoredPictureInsertedSubDocumentChange | AnchoredPictureSizeChangedSubDocumentChange | InlineObjectRunPropertyChangedSubDocumentChange | FieldInsertedSubDocumentChange | FieldDeletedSubDocumentChange | HyperlinkInfoChangedSubDocumentChange | FieldsShowCodeChangedSubDocumentChange | SimpleRunInsertedSubDocumentChange | TextBufferChangedSubDocumentChange | ParagraphInsertedSubDocumentChange | SectionInsertedSubDocumentChange | AnchoredTextBoxInsertedSubDocumentChange | AnchorObjectRemovedSubDocumentChange | IntervalRemovedSubDocumentChange | ParagraphMergedSubDocumentChange | SectionMergedSubDocumentChange | CharacterFormattingChangedSubDocumentChange | CharacterPropertiesChangedSubDocumentChange | ParagraphFormattingChangedSubDocumentChange | ParagraphPropertiesChangedSubDocumentChange | ParagraphAndCharacterMergedPropertiesResetSubDocumentChange | AnchoredTextBoxSizeChangedSubDocumentChange | AnchoredTextBoxPropertiesChangedSubDocumentChange | AnchorInfoPropertyChangedSubDocumentChange | ShapeChangedSubDocumentChange | ShapePropertyChangedSubDocumentChange | CharacterStyleAppliedSubDocumentChange | ParagraphStyleAppliedSubDocumentChange | TableStyleChangedSubDocumentChange | ParagraphNumberingListChangedSubDocumentChange | TableCreatedSubDocumentChange | TableRemovedSubDocumentChange | TableStartPositionShiftedSubDocumentChange | TableCellPropertyChangedSubDocumentChange | TablePropertyChangedSubDocumentChange | TableRowPropertyChangedSubDocumentChange | TableCellSplittedHorizontallySubDocumentChange | TableCellMergedHorizontallySubDocumentChange | TableRowInsertedSubDocumentChange | TableRowRemovedSubDocumentChange | TableCellRemovedSubDocumentChange | TableCellInsertedSubDocumentChange | RangePermissionsChangedSubDocumentChange | RangePermissionsPropertiesChange;
|
70
|
+
export type ModelChange = PageColorModelChange | DefaultTabWidthModelChange | DifferentOddAndEvenPagesModelChange | HeaderFooterCreatedModelChange | HeaderFooterIndexChangedModelChange | LoadFontInfoModelChange | SectionsFormattingChangedModelChange | CreateStyleLinkModelChange | DeleteStyleLinkModelChange | DocumentProtectionChangedModelChange | AbstractNumberingListAddedModelChange | AbstractNumberingListDeletedModelChange | NumberingListAddedModelChange | NumberingListDeletedModelChange | ListLevelPropertyChangedModelChange | ListLevelParagraphPropertyChangedModelChange | ListLevelCharacterPropertyChangedModelChange | IOverrideListLevelChangedModelChange | BookmarkCreatedSubDocumentChange | BookmarkDeletedSubDocumentChange | TabInsertedSubDocumentChange | TabDeletedSubDocumentChange | LoadPicturesInfoSubDocumentChange | InlinePictureInsertedSubDocumentChange | InlinePicturesUpdatedSubDocumentChange | AnchoredPictureInsertedSubDocumentChange | AnchoredPictureSizeChangedSubDocumentChange | InlineObjectRunPropertyChangedSubDocumentChange | FieldInsertedSubDocumentChange | FieldDeletedSubDocumentChange | HyperlinkInfoChangedSubDocumentChange | FieldsShowCodeChangedSubDocumentChange | SimpleRunInsertedSubDocumentChange | TextBufferChangedSubDocumentChange | ParagraphInsertedSubDocumentChange | SectionInsertedSubDocumentChange | AnchoredTextBoxInsertedSubDocumentChange | AnchorObjectRemovedSubDocumentChange | IntervalRemovedSubDocumentChange | ParagraphMergedSubDocumentChange | SectionMergedSubDocumentChange | CharacterFormattingChangedSubDocumentChange | CharacterPropertiesChangedSubDocumentChange | ParagraphFormattingChangedSubDocumentChange | ParagraphPropertiesChangedSubDocumentChange | ParagraphAndCharacterMergedPropertiesResetSubDocumentChange | AnchoredTextBoxSizeChangedSubDocumentChange | AnchoredTextBoxPropertiesChangedSubDocumentChange | AnchorInfoPropertyChangedSubDocumentChange | ShapeChangedSubDocumentChange | ShapePropertyChangedSubDocumentChange | CharacterStyleAppliedSubDocumentChange | ParagraphStyleAppliedSubDocumentChange | TableStyleChangedSubDocumentChange | ParagraphNumberingListChangedSubDocumentChange | TableCreatedSubDocumentChange | TableRemovedSubDocumentChange | TableStartPositionShiftedSubDocumentChange | TableCellPropertyChangedSubDocumentChange | TablePropertyChangedSubDocumentChange | TableRowPropertyChangedSubDocumentChange | TableCellSplittedHorizontallySubDocumentChange | TableCellMergedHorizontallySubDocumentChange | TableRowInsertedSubDocumentChange | TableRowRemovedSubDocumentChange | TableCellRemovedSubDocumentChange | TableCellInsertedSubDocumentChange | RangePermissionsChangedSubDocumentChange | RangePermissionsPropertiesChange | ZoomLevelChange;
|
@@ -69,4 +69,5 @@ export var ModelChangeType;
|
|
69
69
|
ModelChangeType[ModelChangeType["TableCellInserted"] = 66] = "TableCellInserted";
|
70
70
|
ModelChangeType[ModelChangeType["RangePermissionsChanged"] = 67] = "RangePermissionsChanged";
|
71
71
|
ModelChangeType[ModelChangeType["RangePermissionsPropertiesChanged"] = 68] = "RangePermissionsPropertiesChanged";
|
72
|
+
ModelChangeType[ModelChangeType["ZoomLevelChanged"] = 69] = "ZoomLevelChanged";
|
72
73
|
})(ModelChangeType || (ModelChangeType = {}));
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ModelChangeBase } from '../change-base';
|
2
|
+
import { ModelChangeType } from '../enums';
|
3
|
+
export declare class ZoomLevelChange implements ModelChangeBase {
|
4
|
+
zoomLevel: number;
|
5
|
+
prevZoomLevel: number;
|
6
|
+
readonly type = ModelChangeType.ZoomLevelChanged;
|
7
|
+
constructor(zoomLevel: number, prevZoomLevel: number);
|
8
|
+
}
|
@@ -54,7 +54,7 @@ export declare class MaskedCharacterProperties extends CharacterProperties imple
|
|
54
54
|
protected calculateHash(): number;
|
55
55
|
getUseValue(value: CharacterPropertiesMask): boolean;
|
56
56
|
setUseValue(mask: CharacterPropertiesMask, value: boolean): void;
|
57
|
-
setUseValueFull(value: number
|
57
|
+
setUseValueFull(value: number): void;
|
58
58
|
getLowPartUseValue(value: number): number;
|
59
59
|
getHighPartUseValue(value: number): number;
|
60
60
|
getUseValueFull(): number;
|
@@ -5,7 +5,6 @@ import { ColorHelper } from '../color/color';
|
|
5
5
|
import { ColorModelInfo } from '../color/color-model-info';
|
6
6
|
import { ShadingInfo } from '../shadings/shading-info';
|
7
7
|
import { ShadingPattern } from '../shadings/shading-pattern';
|
8
|
-
import { CharacterPropertyDescriptor } from './character-property-descriptor';
|
9
8
|
import { CompositeFontInfo } from './composite-font-info';
|
10
9
|
import { CharacterFormattingScript, CharacterPropertiesMask, StrikeoutType, UnderlineType } from './enums';
|
11
10
|
import { LangInfo } from './lang-info';
|
@@ -144,19 +143,8 @@ export class MaskedCharacterProperties extends CharacterProperties {
|
|
144
143
|
this.useValueExt &= ~this.getHighPartUseValue(mask);
|
145
144
|
}
|
146
145
|
}
|
147
|
-
setUseValueFull(value
|
148
|
-
|
149
|
-
if (onlyForDefault) {
|
150
|
-
CharacterPropertyDescriptor.ALL_FIELDS.forEach((desc) => {
|
151
|
-
const prop = desc.getProp(this);
|
152
|
-
const mask = desc.maskValue();
|
153
|
-
if (desc.binaryEquals(prop, desc.defaultValue))
|
154
|
-
this.setUseValue(mask, !!(mask & lowPartUseValue));
|
155
|
-
});
|
156
|
-
}
|
157
|
-
else {
|
158
|
-
this.useValue = lowPartUseValue;
|
159
|
-
}
|
146
|
+
setUseValueFull(value) {
|
147
|
+
this.useValue = this.getLowPartUseValue(value);
|
160
148
|
this.useValueExt = this.getHighPartUseValue(value);
|
161
149
|
}
|
162
150
|
getLowPartUseValue(value) {
|
@@ -27,6 +27,7 @@ import { TableRowProperties, TableRowPropertiesMask } from '../tables/properties
|
|
27
27
|
import { TableConditionalStyle } from '../tables/styles/table-conditional-style';
|
28
28
|
import { TableStyle } from '../tables/styles/table-style';
|
29
29
|
import { SystemColorValues } from '../themes/enums';
|
30
|
+
import { TableWidthUnitType } from '../tables/secondary-structures/table-units';
|
30
31
|
export class ModelCreator {
|
31
32
|
constructor(options) {
|
32
33
|
this.options = options;
|
@@ -122,6 +123,11 @@ export class ModelCreator {
|
|
122
123
|
}
|
123
124
|
if (this.options.fillTableStyles) {
|
124
125
|
const tableConditionalStyle = new TableConditionalStyle(templateTableProp, templateTableRowProp, templateTableCellProp, templateParProp, templateCharProps, templateTabProp);
|
126
|
+
tableConditionalStyle.tableProperties.cellMargins.left.type = TableWidthUnitType.ModelUnits;
|
127
|
+
tableConditionalStyle.tableProperties.cellMargins.left.value = 108;
|
128
|
+
tableConditionalStyle.tableProperties.cellMargins.right.type = TableWidthUnitType.ModelUnits;
|
129
|
+
tableConditionalStyle.tableProperties.cellMargins.right.value = 108;
|
130
|
+
tableConditionalStyle.tableProperties.mask = TablePropertiesMask.UseLeftMargin | TablePropertiesMask.UseRightMargin;
|
125
131
|
model.stylesManager.addTableStyle(new TableStyle(TableStyle.DEFAULT_STYLENAME, TableStyle.DEFAULT_STYLENAME, false, false, false, true, {}, tableConditionalStyle, null));
|
126
132
|
}
|
127
133
|
if (this.options.initOfficeTheme)
|
@@ -14,8 +14,7 @@ import { HistoryItemIntervalStateObject, HistoryItemIntervalUseStateObject } fro
|
|
14
14
|
export declare class FontUseValueHistoryItem extends IntervalBasedHistoryItem {
|
15
15
|
oldState: HistoryItemIntervalState<HistoryItemIntervalStateObject>;
|
16
16
|
newValue: number;
|
17
|
-
|
18
|
-
constructor(modelManipulator: ModelManipulator, subDocInterval: SubDocumentInterval, newValue: number, keepCustomFormatting?: boolean);
|
17
|
+
constructor(modelManipulator: ModelManipulator, subDocInterval: SubDocumentInterval, newValue: number);
|
19
18
|
redo(): void;
|
20
19
|
undo(): void;
|
21
20
|
}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import { Errors } from '@devexpress/utils/lib/errors';
|
2
2
|
import { IntervalBasedHistoryItem } from '../base/interval-based-history-item';
|
3
3
|
export class FontUseValueHistoryItem extends IntervalBasedHistoryItem {
|
4
|
-
constructor(modelManipulator, subDocInterval, newValue
|
4
|
+
constructor(modelManipulator, subDocInterval, newValue) {
|
5
5
|
super(modelManipulator, subDocInterval);
|
6
6
|
this.newValue = newValue;
|
7
|
-
this.keepCustomFormatting = keepCustomFormatting;
|
8
7
|
}
|
9
8
|
redo() {
|
10
|
-
this.oldState = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, this.newValue
|
9
|
+
this.oldState = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, this.newValue);
|
11
10
|
}
|
12
11
|
undo() {
|
13
12
|
this.modelManipulator.characterProperties.useValue.restoreValue(this.boundSubDocument, this.oldState);
|
@@ -68,4 +68,5 @@ export var JSONControlOptionsProperty;
|
|
68
68
|
JSONControlOptionsProperty[JSONControlOptionsProperty["AcceptsTab"] = 32] = "AcceptsTab";
|
69
69
|
JSONControlOptionsProperty[JSONControlOptionsProperty["Download"] = 33] = "Download";
|
70
70
|
JSONControlOptionsProperty[JSONControlOptionsProperty["RaiseClientEventsOnModificationsViaAPI"] = 34] = "RaiseClientEventsOnModificationsViaAPI";
|
71
|
+
JSONControlOptionsProperty[JSONControlOptionsProperty["AllowZoom"] = 35] = "AllowZoom";
|
71
72
|
})(JSONControlOptionsProperty || (JSONControlOptionsProperty = {}));
|
@@ -74,6 +74,8 @@ export class JSONControlOptionsConverter {
|
|
74
74
|
result.acceptsTab = obj[JSONControlOptionsProperty.AcceptsTab];
|
75
75
|
if (obj[JSONControlOptionsProperty.Download] !== undefined)
|
76
76
|
result.download = obj[JSONControlOptionsProperty.Download];
|
77
|
+
if (obj[JSONControlOptionsProperty.AllowZoom] !== undefined)
|
78
|
+
result.allowZoom = obj[JSONControlOptionsProperty.AllowZoom];
|
77
79
|
result.raiseClientEventsOnModificationsViaAPI = !!obj[JSONControlOptionsProperty.RaiseClientEventsOnModificationsViaAPI];
|
78
80
|
return result;
|
79
81
|
}
|
@@ -124,6 +124,8 @@ export class JSONImporter {
|
|
124
124
|
controlOptions.acceptsTab = !!json[JSONControlOptionsProperty.AcceptsTab];
|
125
125
|
if (json[JSONControlOptionsProperty.Download] !== undefined)
|
126
126
|
controlOptions.download = json[JSONControlOptionsProperty.Download];
|
127
|
+
if (json[JSONControlOptionsProperty.AllowZoom] !== undefined)
|
128
|
+
controlOptions.allowZoom = json[JSONControlOptionsProperty.AllowZoom];
|
127
129
|
controlOptions.raiseClientEventsOnModificationsViaAPI = !!json[JSONControlOptionsProperty.RaiseClientEventsOnModificationsViaAPI];
|
128
130
|
}
|
129
131
|
}
|
@@ -74,7 +74,7 @@ class CharacterPropertiesUseValueManipulator {
|
|
74
74
|
constructor(manipulator) {
|
75
75
|
this.manipulator = manipulator;
|
76
76
|
}
|
77
|
-
setValue(subDocument, interval, newValue
|
77
|
+
setValue(subDocument, interval, newValue) {
|
78
78
|
var oldState = new HistoryItemIntervalState();
|
79
79
|
if (!ControlOptions.isEnabled(subDocument.documentModel.options.characterFormatting))
|
80
80
|
return oldState;
|
@@ -84,7 +84,7 @@ class CharacterPropertiesUseValueManipulator {
|
|
84
84
|
var run = iterator.currentRun;
|
85
85
|
oldState.register(new HistoryItemIntervalStateObject(iterator.currentInterval(), run.maskedCharacterProperties.getUseValueFull()));
|
86
86
|
var properties = run.maskedCharacterProperties.clone();
|
87
|
-
properties.setUseValueFull(newValue
|
87
|
+
properties.setUseValueFull(newValue);
|
88
88
|
run.setCharacterProperties(properties);
|
89
89
|
run.onCharacterPropertiesChanged();
|
90
90
|
}
|
@@ -8,7 +8,7 @@ export interface IIntervalPropertyWithUseValueManipulator<T> {
|
|
8
8
|
restoreValue(subDocument: SubDocument, state: HistoryItemIntervalState<HistoryItemIntervalUseStateObject>): any;
|
9
9
|
}
|
10
10
|
export interface IIntervalPropertyManipulator<T> {
|
11
|
-
setValue(subDocument: SubDocument, interval: FixedInterval, newValue: T
|
11
|
+
setValue(subDocument: SubDocument, interval: FixedInterval, newValue: T): HistoryItemIntervalState<HistoryItemIntervalStateObject>;
|
12
12
|
restoreValue(subDocument: SubDocument, state: HistoryItemIntervalState<HistoryItemIntervalStateObject>): any;
|
13
13
|
}
|
14
14
|
export interface IListLevelPropertyManipulator<T> {
|
@@ -62,10 +62,11 @@ export declare class ModelManipulator {
|
|
62
62
|
textBox: TextBoxManipulator;
|
63
63
|
paragraph: ParagraphManipulator;
|
64
64
|
documentMerger: DocumentMerger;
|
65
|
-
modelListeners
|
65
|
+
private modelListeners;
|
66
66
|
onFontsChanged: EventDispatcher<IFontsChangesListener>;
|
67
67
|
constructor(modelManager: IModelManager, batchUpdatableObject: IBatchUpdatableObject);
|
68
68
|
notifyModelChanged(change: ModelChange): void;
|
69
|
+
addModelListener(listener: IModelChangesListener): void;
|
69
70
|
removeModelListener(listener: IModelChangesListener): void;
|
70
71
|
raiseFontAdded(newFontInfo: FontInfo | null): void;
|
71
72
|
raiseFontRemoved(font: FontInfo | null): void;
|
@@ -61,6 +61,10 @@ export class ModelManipulator {
|
|
61
61
|
notifyModelChanged(change) {
|
62
62
|
this.modelListeners.forEach(listener => listener.modelChanged(change));
|
63
63
|
}
|
64
|
+
addModelListener(listener) {
|
65
|
+
if (this.modelListeners.indexOf(listener) < 0)
|
66
|
+
this.modelListeners.push(listener);
|
67
|
+
}
|
64
68
|
removeModelListener(listener) {
|
65
69
|
const index = this.modelListeners.indexOf(listener);
|
66
70
|
if (index >= 0)
|
@@ -33,6 +33,7 @@ export declare class ControlOptions {
|
|
33
33
|
tables: DocumentCapability;
|
34
34
|
tableStyle: DocumentCapability;
|
35
35
|
floatingObjects: DocumentCapability;
|
36
|
+
allowZoom: DocumentCapability;
|
36
37
|
acceptsTab: boolean;
|
37
38
|
raiseClientEventsOnModificationsViaAPI: boolean;
|
38
39
|
static isEnabled(capability: DocumentCapability): boolean;
|
@@ -35,6 +35,7 @@ export class ControlOptions {
|
|
35
35
|
this.tables = DocumentCapability.Default;
|
36
36
|
this.tableStyle = DocumentCapability.Default;
|
37
37
|
this.floatingObjects = DocumentCapability.Default;
|
38
|
+
this.allowZoom = DocumentCapability.Default;
|
38
39
|
this.acceptsTab = true;
|
39
40
|
this.raiseClientEventsOnModificationsViaAPI = true;
|
40
41
|
}
|
@@ -42,14 +42,19 @@ export declare class TabProperties implements IEquatable<TabProperties>, IClonea
|
|
42
42
|
setTabs(tabProp: TabProperties): void;
|
43
43
|
merge(tabProperties: TabProperties): void;
|
44
44
|
}
|
45
|
-
export declare class
|
45
|
+
export declare abstract class TabInfoBase<T extends TabInfoBase<T>> implements IEquatable<T>, ICloneable<T> {
|
46
46
|
alignment: TabAlign;
|
47
47
|
leader: TabLeaderType;
|
48
|
-
position: number;
|
49
|
-
isDefault: boolean;
|
50
48
|
deleted: boolean;
|
49
|
+
isDefault: boolean;
|
50
|
+
constructor(alignment: TabAlign, leader: TabLeaderType, deleted: boolean, isDefault: boolean);
|
51
|
+
equals(obj: T): boolean;
|
52
|
+
abstract clone(): T;
|
53
|
+
}
|
54
|
+
export declare class TabInfo extends TabInfoBase<TabInfo> {
|
55
|
+
position: number;
|
51
56
|
readonly isParagraphIndent: boolean;
|
52
57
|
constructor(position: number, alignment: TabAlign, leader: TabLeaderType, deleted: boolean, isDefault: boolean, isParagraphIndent?: boolean);
|
53
|
-
clone(): TabInfo;
|
54
58
|
equals(obj: TabInfo): boolean;
|
59
|
+
clone(): TabInfo;
|
55
60
|
}
|
@@ -106,26 +106,32 @@ export class TabProperties {
|
|
106
106
|
this.sort();
|
107
107
|
}
|
108
108
|
}
|
109
|
-
export class
|
110
|
-
constructor(
|
111
|
-
this.position = position;
|
109
|
+
export class TabInfoBase {
|
110
|
+
constructor(alignment, leader, deleted, isDefault) {
|
112
111
|
this.alignment = alignment;
|
113
112
|
this.leader = leader;
|
114
|
-
this.isDefault = isDefault;
|
115
113
|
this.deleted = deleted;
|
116
|
-
this.
|
117
|
-
}
|
118
|
-
clone() {
|
119
|
-
return new TabInfo(this.position, this.alignment, this.leader, this.deleted, this.isDefault, this.isParagraphIndent);
|
114
|
+
this.isDefault = isDefault;
|
120
115
|
}
|
121
116
|
equals(obj) {
|
122
117
|
if (!obj)
|
123
118
|
return false;
|
124
|
-
return this.alignment
|
125
|
-
this.leader
|
126
|
-
this.
|
127
|
-
this.
|
128
|
-
|
129
|
-
|
119
|
+
return this.alignment === obj.alignment &&
|
120
|
+
this.leader === obj.leader &&
|
121
|
+
this.deleted === obj.deleted &&
|
122
|
+
this.isDefault === obj.isDefault;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
export class TabInfo extends TabInfoBase {
|
126
|
+
constructor(position, alignment, leader, deleted, isDefault, isParagraphIndent = false) {
|
127
|
+
super(alignment, leader, deleted, isDefault);
|
128
|
+
this.position = position;
|
129
|
+
this.isParagraphIndent = isParagraphIndent;
|
130
|
+
}
|
131
|
+
equals(obj) {
|
132
|
+
return super.equals(obj) && this.position == obj.position;
|
133
|
+
}
|
134
|
+
clone() {
|
135
|
+
return new TabInfo(this.position, this.alignment, this.leader, this.deleted, this.isDefault);
|
130
136
|
}
|
131
137
|
}
|
@@ -9,6 +9,8 @@ export declare class RichUtils {
|
|
9
9
|
static predefinedFontSizes: number[];
|
10
10
|
static minFontSize: number;
|
11
11
|
static maxFontSize: number;
|
12
|
+
static minZoomLevel: number;
|
13
|
+
static maxZoomLevel: number;
|
12
14
|
static specialCharacters: SpecialCharacters;
|
13
15
|
static getSelectedParagraphs(intervals: FixedInterval[], subDocument: SubDocument): {
|
14
16
|
paragraphs: Paragraph[];
|
@@ -63,4 +63,6 @@ RichUtils.isAlphanumeric = /^[\u00C0-\u1FFF\u2C00-\uD7FF\w]+$/;
|
|
63
63
|
RichUtils.predefinedFontSizes = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
|
64
64
|
RichUtils.minFontSize = 1;
|
65
65
|
RichUtils.maxFontSize = 600;
|
66
|
+
RichUtils.minZoomLevel = 0.5;
|
67
|
+
RichUtils.maxZoomLevel = 2.0;
|
66
68
|
RichUtils.specialCharacters = new SpecialCharacters();
|
@@ -64,8 +64,8 @@ export class ResizeBoxHelper {
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
getSize(evt) {
|
67
|
-
var absDeltaX = evt.absolutePoint.x - (this.startScrollLeft - evt.scroll.x) - this.startX;
|
68
|
-
var absDeltaY = evt.absolutePoint.y - (this.startScrollTop - evt.scroll.y) - this.startY;
|
67
|
+
var absDeltaX = (evt.absolutePoint.x - (this.startScrollLeft - evt.scroll.x) - this.startX) / this.control.viewManager.zoomLevel;
|
68
|
+
var absDeltaY = (evt.absolutePoint.y - (this.startScrollTop - evt.scroll.y) - this.startY) / this.control.viewManager.zoomLevel;
|
69
69
|
var deltaX = absDeltaX * Math.cos(this.rotation) - (-absDeltaY) * Math.sin(this.rotation);
|
70
70
|
var deltaY = -(absDeltaX * Math.sin(this.rotation) + (-absDeltaY) * Math.cos(this.rotation));
|
71
71
|
var newWidth, newHeight;
|
@@ -76,7 +76,6 @@ export declare abstract class RichEditCore implements IRichEditControl {
|
|
76
76
|
private selectionFormatter;
|
77
77
|
private scrollFormatter;
|
78
78
|
private boxVisualizerManager;
|
79
|
-
private simpleViewCanvasSizeManager;
|
80
79
|
private _isDisposed;
|
81
80
|
get isReadOnlyPersistent(): boolean;
|
82
81
|
lastSavedHistoryItemId: number;
|
@@ -20,7 +20,6 @@ import { afterFontsLoaded, fontWebApiAvailable } from '@devexpress/utils/lib/uti
|
|
20
20
|
import { StringUtils } from '@devexpress/utils/lib/utils/string';
|
21
21
|
import { HtmlImporter } from './formats/html/import/html-importer';
|
22
22
|
import { AutoCorrectService } from './auto-correct/auto-correct-service';
|
23
|
-
import { SimpleViewCanvasSizeManager } from './canvas/renderes/common/document-renderer';
|
24
23
|
import { ViewManager } from './canvas/renderes/view-manager';
|
25
24
|
import { ClientSideEvents } from './client-side-events';
|
26
25
|
import { RichEditClientCommand } from './commands/client-command';
|
@@ -90,9 +89,8 @@ export class RichEditCore {
|
|
90
89
|
this.searchManager.raiseSearchReset();
|
91
90
|
this.clientSideEvents.raiseDocumentChanged();
|
92
91
|
});
|
93
|
-
this.simpleViewCanvasSizeManager = new SimpleViewCanvasSizeManager(this.viewManager.canvasManager, this);
|
94
92
|
if (this.innerClientProperties.viewsSettings.isSimpleView)
|
95
|
-
this.simpleViewCanvasSizeManager.setViewMode(true);
|
93
|
+
this.viewManager.canvasManager.simpleViewCanvasSizeManager.setViewMode(true);
|
96
94
|
if (fontWebApiAvailable())
|
97
95
|
afterFontsLoaded(() => {
|
98
96
|
this.invalidateLayoutAfterFontsLoaded();
|
@@ -141,15 +139,19 @@ export class RichEditCore {
|
|
141
139
|
]);
|
142
140
|
this.modelManager.modelManipulator.clearListeners();
|
143
141
|
this.modelManager.history.clear();
|
144
|
-
this.modelManager.modelManipulator.
|
145
|
-
this.modelManager.modelManipulator.
|
146
|
-
this.modelManager.modelManipulator.
|
147
|
-
this.modelManager.modelManipulator.
|
142
|
+
this.modelManager.modelManipulator.addModelListener(this.inputPositionModelChangesListener);
|
143
|
+
this.modelManager.modelManipulator.addModelListener(this.layoutFormatterManager.modelChangesListener);
|
144
|
+
this.modelManager.modelManipulator.addModelListener(this.selectionModelChangesListener);
|
145
|
+
this.modelManager.modelManipulator.addModelListener(new SpellCheckerModelChangesListener(this.spellChecker));
|
148
146
|
if (this.barHolder.ribbon)
|
149
|
-
this.modelManager.modelManipulator.
|
150
|
-
this.modelManager.modelManipulator.
|
151
|
-
this.modelManager.modelManipulator.
|
152
|
-
this.modelManager.modelManipulator.
|
147
|
+
this.modelManager.modelManipulator.addModelListener(this.barHolder.ribbon);
|
148
|
+
this.modelManager.modelManipulator.addModelListener(this.barHolder.contextMenu);
|
149
|
+
this.modelManager.modelManipulator.addModelListener(this.horizontalRulerControl);
|
150
|
+
this.modelManager.modelManipulator.addModelListener(this.selectionFormatter);
|
151
|
+
this.modelManager.modelManipulator.addModelListener(this.viewManager);
|
152
|
+
this.modelManager.modelManipulator.addModelListener(this.viewManager.canvasManager.simpleViewCanvasSizeManager);
|
153
|
+
this.modelManager.modelManipulator.addModelListener(this.viewManager.canvasScrollManager);
|
154
|
+
this.modelManager.modelManipulator.addModelListener(this.viewManager.scroll);
|
153
155
|
this.registerFontChangesListeners();
|
154
156
|
this.selection.onChanged.add(this.searchManager);
|
155
157
|
this.selection.onChanged.add(this.boxVisualizerManager.resizeBoxVisualizer);
|
@@ -166,8 +168,8 @@ export class RichEditCore {
|
|
166
168
|
this.selection.onChanged.add(this.globalEventDispatcher);
|
167
169
|
this.selection.onChanged.add(this.barHolder.publicUiChangesListener);
|
168
170
|
this.registerActiveContextTabManager();
|
169
|
-
this.modelManager.modelManipulator.
|
170
|
-
this.modelManager.modelManipulator.
|
171
|
+
this.modelManager.modelManipulator.addModelListener(this.globalEventDispatcher);
|
172
|
+
this.modelManager.modelManipulator.addModelListener(this.barHolder.publicUiChangesListener);
|
171
173
|
this.inputController.initExporter();
|
172
174
|
}
|
173
175
|
dispose() {
|
@@ -182,7 +184,6 @@ export class RichEditCore {
|
|
182
184
|
this.viewManager.dispose();
|
183
185
|
this.layoutFormatterManager.dispose();
|
184
186
|
this.eventManager.dispose();
|
185
|
-
this.simpleViewCanvasSizeManager.dispose();
|
186
187
|
this.loadingPanelManager.dispose();
|
187
188
|
this.commandManager.dispose();
|
188
189
|
this.spellChecker.dispose();
|
@@ -215,7 +216,6 @@ export class RichEditCore {
|
|
215
216
|
this.scrollFormatter = null;
|
216
217
|
this.boxVisualizerManager = null;
|
217
218
|
this.globalEventDispatcher = null;
|
218
|
-
this.simpleViewCanvasSizeManager = null;
|
219
219
|
this.selectionModelChangesListener = null;
|
220
220
|
this.loadingPanelManager = null;
|
221
221
|
this.inputPositionModelChangesListener = null;
|
@@ -292,12 +292,7 @@ export class RichEditCore {
|
|
292
292
|
}
|
293
293
|
closeDocument() {
|
294
294
|
this.selection.onChanged.remove(this.globalEventDispatcher);
|
295
|
-
|
296
|
-
if (this.modelManager.modelManipulator.modelListeners[ind] == this.globalEventDispatcher) {
|
297
|
-
this.modelManager.modelManipulator.modelListeners.splice(ind, 1);
|
298
|
-
break;
|
299
|
-
}
|
300
|
-
}
|
295
|
+
this.modelManager.modelManipulator.removeModelListener(this.globalEventDispatcher);
|
301
296
|
this.barHolder.setEnabled(false);
|
302
297
|
if (this.horizontalRulerControl)
|
303
298
|
this.horizontalRulerControl.setEnable(false);
|
@@ -350,7 +345,7 @@ export class RichEditCore {
|
|
350
345
|
onViewTypeChanged() {
|
351
346
|
this.viewManager.renderer.onViewTypeChanged();
|
352
347
|
this.horizontalRulerControl.onViewTypeChanged();
|
353
|
-
this.simpleViewCanvasSizeManager.setViewMode(this.innerClientProperties.viewsSettings.isSimpleView);
|
348
|
+
this.viewManager.canvasManager.simpleViewCanvasSizeManager.setViewMode(this.innerClientProperties.viewsSettings.isSimpleView);
|
354
349
|
}
|
355
350
|
getModifiedState() {
|
356
351
|
if (this.lastSavedHistoryItemId != this.modelManager.history.getCurrentItemId())
|
@@ -1,9 +1,14 @@
|
|
1
1
|
import { RulerControls } from '../manager';
|
2
2
|
import { RulerModelData } from '../model-data';
|
3
|
+
import { IZoomLevelHolder } from '../../../interfaces/i-zoom-level-holder';
|
3
4
|
export declare class RulerModelState {
|
4
|
-
modelValue: number;
|
5
5
|
enabled: boolean;
|
6
|
-
|
6
|
+
private zoomLevelHolder;
|
7
|
+
private _modelValue;
|
8
|
+
get modelValue(): number;
|
9
|
+
get originalModelValue(): number;
|
10
|
+
set modelValue(value: number);
|
11
|
+
constructor(modelValue: number, enabled: boolean, zoomLevelHolder: IZoomLevelHolder);
|
7
12
|
clone(): RulerModelState;
|
8
13
|
}
|
9
14
|
export declare abstract class RulerBase {
|
@@ -1,12 +1,20 @@
|
|
1
1
|
import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
2
2
|
import { DocumentRenderer } from '../../../canvas/renderes/common/document-renderer';
|
3
|
+
import { RulerValue } from './zoomable-value';
|
3
4
|
export class RulerModelState {
|
4
|
-
|
5
|
-
|
5
|
+
get modelValue() { return this._modelValue.value; }
|
6
|
+
;
|
7
|
+
get originalModelValue() { return this._modelValue.originalValue; }
|
8
|
+
;
|
9
|
+
set modelValue(value) { this._modelValue.value = value; }
|
10
|
+
;
|
11
|
+
constructor(modelValue, enabled, zoomLevelHolder) {
|
6
12
|
this.enabled = enabled;
|
13
|
+
this.zoomLevelHolder = zoomLevelHolder;
|
14
|
+
this._modelValue = new RulerValue(modelValue, zoomLevelHolder);
|
7
15
|
}
|
8
16
|
clone() {
|
9
|
-
return new RulerModelState(this.
|
17
|
+
return new RulerModelState(this.originalModelValue, this.enabled, this.zoomLevelHolder);
|
10
18
|
}
|
11
19
|
}
|
12
20
|
export class RulerBase {
|