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
package/index.d.ts
CHANGED
package/index.js
CHANGED
@@ -74,6 +74,7 @@ export declare class Constants {
|
|
74
74
|
"4": number;
|
75
75
|
}[];
|
76
76
|
static getFontSizesList(): number[];
|
77
|
+
static getZoomLevelsList(): number[];
|
77
78
|
static getParagraphStylesList(): string[];
|
78
79
|
static getTableStylesList(): string[];
|
79
80
|
private static localizedDefaultPresetStyles;
|
package/lib/client/_constants.js
CHANGED
@@ -6,6 +6,9 @@ export class Constants {
|
|
6
6
|
static getFontSizesList() {
|
7
7
|
return [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
|
8
8
|
}
|
9
|
+
static getZoomLevelsList() {
|
10
|
+
return [0.5, 0.75, 1.0, 1.25, 1.5, 2.0];
|
11
|
+
}
|
9
12
|
static getParagraphStylesList() {
|
10
13
|
const styles = Constants.getLocalizedDefaultPresetStyles();
|
11
14
|
return styles['1'].filter(f => f['4'] == 0).map(f => {
|
@@ -16,6 +16,7 @@ export class RibbonItemsData {
|
|
16
16
|
const fontSizes = Constants.getFontSizesList().map(s => {
|
17
17
|
return { text: s.toString(), value: s };
|
18
18
|
});
|
19
|
+
const zoomLevels = Constants.getZoomLevelsList();
|
19
20
|
function getTrimmedMessage(id) {
|
20
21
|
const message = formatMessage(id);
|
21
22
|
const trimmedFromEnd = StringUtils.trimEnd(message, ['\\.']);
|
@@ -276,6 +277,16 @@ export class RibbonItemsData {
|
|
276
277
|
{ type: 'Button', text: formatMessage('XtraRichEditStringId.MenuCmd_SwitchToPrintLayoutView'), icon: 'dxre-icon-PrintLayoutView', alwaysShowText: true, name: Command.SwitchToPrintLayoutView, isToggleMode: true },
|
277
278
|
{ type: 'Button', text: formatMessage('XtraRichEditStringId.MenuCmd_ToggleShowHorizontalRuler'), icon: 'dxre-icon-RulerHorizontal', alwaysShowText: true, name: Command.ToggleShowHorizontalRuler, isToggleMode: true, beginGroup: true },
|
278
279
|
{ type: 'Button', text: formatMessage('ASPxRichEditStringId.MenuCmd_ToggleFullScreen'), icon: 'dxre-icon-FullScreen', alwaysShowText: true, name: Command.FullScreen, isToggleMode: true, beginGroup: true },
|
280
|
+
{ type: 'SelectBox', dataSource: zoomLevels, width: 90, name: Command.ChangeZoomLevel, beginGroup: true, acceptCustomValue: true, valueExpr: "this",
|
281
|
+
onCustomItemCreating: function (e) {
|
282
|
+
const parsed = parseFloat(e.text);
|
283
|
+
e.customItem = isNaN(parsed) ? e.text : parsed / 100;
|
284
|
+
},
|
285
|
+
displayExpr: function (item) {
|
286
|
+
const parsed = parseFloat(item);
|
287
|
+
return isNaN(parsed) ? item : Math.round(parsed * 100) + '%';
|
288
|
+
}
|
289
|
+
},
|
279
290
|
];
|
280
291
|
return [
|
281
292
|
{ title: formatMessage('ASPxRichEditStringId.PageFile'), items: fileToolBarItems, id: RibbonTabType.File },
|
@@ -32,6 +32,7 @@ import { RulerVisibility } from '../common/ui/ruler/settings';
|
|
32
32
|
import { FullScreenHelper } from './ui/full-screen-helper';
|
33
33
|
import config from 'devextreme/core/config';
|
34
34
|
import { SizeUtils } from '../common/utils/size-utils';
|
35
|
+
import { DocumentCapability } from '../common/model/options/control';
|
35
36
|
export class ClientRichEdit {
|
36
37
|
get clientQuickSearchPanel() {
|
37
38
|
if (!this._clientQuickSearchPanel)
|
@@ -61,8 +62,8 @@ export class ClientRichEdit {
|
|
61
62
|
this.rawDataSource = settings.rawDataSource;
|
62
63
|
this.contextMenuSettings = settings.contextMenuSettings;
|
63
64
|
this.fullScreenHelper = new FullScreenHelper(element);
|
64
|
-
if ("
|
65
|
-
config(JSON.parse(atob("
|
65
|
+
if ("eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVJWTTBSVlk0YmxKaVpYVk9OVGRWVEdSbFlVeHhZeUlLZlE9PS5MN1o0YXlNMTRnUWtScExSaEt6MGZSMDU5d1E5cWhhMi9ESThnRG83SEJxbFM2L1BMNVRtTmRrTVRzMmdUL3oyUFVQZDgyZGRMM0dsbjZiQUM0aXB4cUI0Y1ozT1FkZjhVc1pmMm9TOCs5SnliZGdCS1diYnFseXdEMUVFbkwwNmV0eWdtQT09In0=")
|
66
|
+
config(JSON.parse(atob("eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVJWTTBSVlk0YmxKaVpYVk9OVGRWVEdSbFlVeHhZeUlLZlE9PS5MN1o0YXlNMTRnUWtScExSaEt6MGZSMDU5d1E5cWhhMi9ESThnRG83SEJxbFM2L1BMNVRtTmRrTVRzMmdUL3oyUFVQZDgyZGRMM0dsbjZiQUM0aXB4cUI0Y1ozT1FkZjhVc1pmMm9TOCs5SnliZGdCS1diYnFseXdEMUVFbkwwNmV0eWdtQT09In0=")));
|
66
67
|
this.prepareElement(element, settings);
|
67
68
|
this.initDefaultFontsAndStyles();
|
68
69
|
this.initBars(settings.ribbon, settings.fonts);
|
@@ -166,6 +167,7 @@ export class ClientRichEdit {
|
|
166
167
|
options.fonts = settings.fonts;
|
167
168
|
options.spellChecker = settings.spellCheck;
|
168
169
|
options.nonce = settings.nonce;
|
170
|
+
options.control.allowZoom = settings.view.allowZoom ? DocumentCapability.Enabled : DocumentCapability.Disabled;
|
169
171
|
this.core = new ClientRichEditCore(this, this.name, this.element, Math.random().toString(), settings.readOnly, this.barHolder, settings.unit, this.rulerSettings, options, settings.view, this.getStringResources());
|
170
172
|
}
|
171
173
|
initCore() {
|
@@ -245,7 +247,7 @@ export class ClientRichEdit {
|
|
245
247
|
const ribbonBar = new ClientRibbonBar(this, this.element, ribbon, fonts);
|
246
248
|
this.barHolder.ribbon = ribbonBar;
|
247
249
|
if (this.core) {
|
248
|
-
this.core.modelManager.modelManipulator.
|
250
|
+
this.core.modelManager.modelManipulator.addModelListener(this.barHolder.ribbon);
|
249
251
|
this.core.selection.onChanged.add(this.barHolder.ribbon);
|
250
252
|
ribbonBar.initialize(this.core);
|
251
253
|
}
|
@@ -432,6 +432,18 @@ export function executeApiCommandCore(commandManager, commandId, parameter) {
|
|
432
432
|
case ViewTabCommandId.ToggleFullScreen:
|
433
433
|
parameter = undefined;
|
434
434
|
break;
|
435
|
+
case ViewTabCommandId.ChangeZoomLevel:
|
436
|
+
{
|
437
|
+
const zoomLevel = ApiParametersChecker.check(parameter, 2, false, [
|
438
|
+
ApiParametersChecker.numberDescriptor('parameter', val => val)
|
439
|
+
]);
|
440
|
+
parameter = zoomLevel;
|
441
|
+
break;
|
442
|
+
}
|
443
|
+
;
|
444
|
+
case ViewTabCommandId.ToggleAllowZoom:
|
445
|
+
parameter = undefined;
|
446
|
+
break;
|
435
447
|
case HeaderAndFooterTabCommandId.GoToPageHeader:
|
436
448
|
parameter = undefined;
|
437
449
|
break;
|
@@ -52,6 +52,8 @@ export interface IRichEditConfirmOnLosingChangesSettings {
|
|
52
52
|
message?: string;
|
53
53
|
}
|
54
54
|
export interface IRichEditViewSettings {
|
55
|
+
zoomLevel?: number;
|
56
|
+
allowZoom?: boolean;
|
55
57
|
viewType?: ViewType;
|
56
58
|
simpleViewSettings?: IRichEditSimpleViewSettings;
|
57
59
|
printLayoutViewSettings?: IRichEditPrintLayoutViewSettings;
|
@@ -11,7 +11,7 @@ export declare class ApiParametersChecker {
|
|
11
11
|
static check<TResult>(value: any, parameterIndex: ArgsCheckerParameterIndex, canBeUndefined: boolean, pairs: Array<ApiParameterDescriptor<any, TResult>>): TResult;
|
12
12
|
static showErrorString<TResult>(parameterIndex: number, canBeUndefined: boolean, pairs: Array<ApiParameterDescriptor<any, TResult>>): string;
|
13
13
|
static defaultDescriptor<TResult>(getResult: () => TResult): ApiParameterDescriptor<any, TResult>;
|
14
|
-
static numberDescriptor<TResult>(parameterName: string, getResult: (value: number) => TResult, minBound?: number, maxBound?: number): ApiParameterDescriptor<number, TResult>;
|
14
|
+
static numberDescriptor<TResult>(parameterName: string, getResult: (value: number) => TResult, minBound?: number, maxBound?: number, closedMaxBound?: boolean): ApiParameterDescriptor<number, TResult>;
|
15
15
|
static booleanDescriptor<TResult>(parameterName: string, getResult: (value: boolean) => TResult): ApiParameterDescriptor<boolean, TResult>;
|
16
16
|
static arrayDescriptor<TResult, ArrayContentType>(parameterName: string, getResult: (value: ArrayContentType[]) => TResult): ApiParameterDescriptor<ArrayContentType[], TResult>;
|
17
17
|
static functionDescriptor<TResult>(parameterName: string, getResult: (value: any) => TResult): ApiParameterDescriptor<() => void, TResult>;
|
@@ -66,8 +66,8 @@ export class ApiParametersChecker {
|
|
66
66
|
static defaultDescriptor(getResult) {
|
67
67
|
return new ApiParameterDescriptor('', '', () => true, getResult);
|
68
68
|
}
|
69
|
-
static numberDescriptor(parameterName, getResult, minBound = Constants.MIN_SAFE_INTEGER, maxBound = Constants.MAX_SAFE_INTEGER) {
|
70
|
-
return new ApiParameterDescriptor(parameterName, `number on interval [${minBound}, ${maxBound}]`, (value) => isNumber(value) && (value >= minBound && value < maxBound), getResult);
|
69
|
+
static numberDescriptor(parameterName, getResult, minBound = Constants.MIN_SAFE_INTEGER, maxBound = Constants.MAX_SAFE_INTEGER, closedMaxBound = false) {
|
70
|
+
return new ApiParameterDescriptor(parameterName, `number on interval [${minBound}, ${maxBound}]`, (value) => isNumber(value) && (value >= minBound && (closedMaxBound ? value <= maxBound : value < maxBound)), getResult);
|
71
71
|
}
|
72
72
|
static booleanDescriptor(parameterName, getResult) {
|
73
73
|
return new ApiParameterDescriptor(parameterName, 'boolean', (value) => typeof value === 'boolean', getResult);
|
@@ -149,7 +149,9 @@ export declare enum ViewTabCommandId {
|
|
149
149
|
SwitchToSimpleView = 405,
|
150
150
|
SwitchToPrintLayout = 406,
|
151
151
|
ToggleShowHorizontalRuler = 94,
|
152
|
-
ToggleFullScreen = 98
|
152
|
+
ToggleFullScreen = 98,
|
153
|
+
ChangeZoomLevel = 460,
|
154
|
+
ToggleAllowZoom = 461
|
153
155
|
}
|
154
156
|
export declare enum HeaderAndFooterTabCommandId {
|
155
157
|
GoToPageHeader = 227,
|
@@ -157,6 +157,8 @@ export var ViewTabCommandId;
|
|
157
157
|
ViewTabCommandId[ViewTabCommandId["SwitchToPrintLayout"] = 406] = "SwitchToPrintLayout";
|
158
158
|
ViewTabCommandId[ViewTabCommandId["ToggleShowHorizontalRuler"] = 94] = "ToggleShowHorizontalRuler";
|
159
159
|
ViewTabCommandId[ViewTabCommandId["ToggleFullScreen"] = 98] = "ToggleFullScreen";
|
160
|
+
ViewTabCommandId[ViewTabCommandId["ChangeZoomLevel"] = 460] = "ChangeZoomLevel";
|
161
|
+
ViewTabCommandId[ViewTabCommandId["ToggleAllowZoom"] = 461] = "ToggleAllowZoom";
|
160
162
|
})(ViewTabCommandId || (ViewTabCommandId = {}));
|
161
163
|
export var HeaderAndFooterTabCommandId;
|
162
164
|
(function (HeaderAndFooterTabCommandId) {
|
@@ -75,6 +75,8 @@ export interface IConfirmOnLosingChangesSettings {
|
|
75
75
|
message?: string;
|
76
76
|
}
|
77
77
|
export interface IViewSettings {
|
78
|
+
zoomLevel?: number;
|
79
|
+
allowZoom?: boolean;
|
78
80
|
viewType?: ViewType;
|
79
81
|
simpleViewSettings?: ISimpleViewSettings;
|
80
82
|
printLayoutViewSettings?: IPrintLayoutViewSettings;
|
@@ -80,6 +80,10 @@ declare class RichEditPublic {
|
|
80
80
|
set documentExtension(filePath: string);
|
81
81
|
get hasUnsavedChanges(): boolean;
|
82
82
|
set hasUnsavedChanges(value: boolean);
|
83
|
+
get zoomLevel(): number;
|
84
|
+
set zoomLevel(value: number);
|
85
|
+
get allowZoom(): boolean;
|
86
|
+
set allowZoom(value: boolean);
|
83
87
|
newDocument(): void;
|
84
88
|
openDocument(fileContent?: File | Blob | ArrayBuffer | string, documentName?: string, documentFormat?: DocumentFormatApi, callback?: (importSuccess: boolean) => void): void;
|
85
89
|
saveDocument(documentFormat?: DocumentFormatApi, reason?: string, documentName?: string): void;
|
@@ -42,6 +42,8 @@ import { DocumentProcessorApi } from './document-processor';
|
|
42
42
|
import { NusaSettings } from './nusa/settings';
|
43
43
|
import { Utils } from './utils';
|
44
44
|
import '../../common/utils/_license';
|
45
|
+
import { ApiParametersChecker } from '../model-api/api-utils/parameter-checker';
|
46
|
+
import { RichUtils } from '../../common/model/rich-utils';
|
45
47
|
class RichEditPublic {
|
46
48
|
get events() { return this._native.events; }
|
47
49
|
constructor(htmlElement, options) {
|
@@ -222,6 +224,25 @@ class RichEditPublic {
|
|
222
224
|
}
|
223
225
|
get hasUnsavedChanges() { return !this._native.documentSaved; }
|
224
226
|
set hasUnsavedChanges(value) { this._native.documentSaved = !value; }
|
227
|
+
get zoomLevel() {
|
228
|
+
return this._native.core.viewManager.zoomLevel;
|
229
|
+
}
|
230
|
+
set zoomLevel(value) {
|
231
|
+
const zoomLevelValue = ApiParametersChecker.check(value, 1, false, [
|
232
|
+
ApiParametersChecker.numberDescriptor('value', val => val, RichUtils.minZoomLevel, RichUtils.maxZoomLevel, true)
|
233
|
+
]);
|
234
|
+
this._native.core.viewManager.zoomLevel = zoomLevelValue;
|
235
|
+
this._native.core.barHolder.forceUpdate({ [RichEditClientCommand.ChangeZoomLevel]: true });
|
236
|
+
}
|
237
|
+
get allowZoom() {
|
238
|
+
return this._native.core.viewManager.allowZoom;
|
239
|
+
}
|
240
|
+
set allowZoom(value) {
|
241
|
+
const allowZoomValue = ApiParametersChecker.check(value, 1, false, [
|
242
|
+
ApiParametersChecker.booleanDescriptor('value', val => val)
|
243
|
+
]);
|
244
|
+
this._native.core.viewManager.allowZoom = allowZoomValue;
|
245
|
+
}
|
225
246
|
newDocument() {
|
226
247
|
this._native.core.commandManager.getCommand(RichEditClientCommand.CreateNewDocumentLocally)
|
227
248
|
.execute(true);
|
package/lib/client/settings.js
CHANGED
@@ -183,6 +183,10 @@ export class Settings {
|
|
183
183
|
if (isDefined(settings.view)) {
|
184
184
|
if (isDefined(settings.view.viewType))
|
185
185
|
result.view.viewType = settings.view.viewType;
|
186
|
+
if (isDefined(settings.view.zoomLevel))
|
187
|
+
result.view.zoomLevel = settings.view.zoomLevel;
|
188
|
+
if (isDefined(settings.view.allowZoom))
|
189
|
+
result.view.allowZoom = settings.view.allowZoom;
|
186
190
|
if (isDefined(settings.view.simpleViewSettings)) {
|
187
191
|
const paddings = settings.view.simpleViewSettings.paddings;
|
188
192
|
if (isDefined(paddings)) {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
var _a;
|
2
1
|
export class FocusHelper {
|
3
2
|
static preventFocusOnClick(element) {
|
4
3
|
return new FocusBlocker(element);
|
@@ -11,24 +10,23 @@ class FocusBlocker {
|
|
11
10
|
this.addEventListeners(target);
|
12
11
|
}
|
13
12
|
addEventListeners(element) {
|
14
|
-
element.addEventListener("
|
13
|
+
element.addEventListener("pointerdown", this.onPointerDownBinded);
|
15
14
|
}
|
16
15
|
removeEventListeners(element) {
|
17
|
-
element.removeEventListener("
|
16
|
+
element.removeEventListener("pointerdown", this.onPointerDownBinded);
|
18
17
|
}
|
19
18
|
onPointerDown(event) {
|
20
19
|
for (const element of event.composedPath()) {
|
20
|
+
if (!(element instanceof HTMLElement))
|
21
|
+
continue;
|
21
22
|
if (element === this.target) {
|
22
23
|
event.preventDefault();
|
23
24
|
break;
|
24
25
|
}
|
25
|
-
if (element
|
26
|
+
if (!this.target.contains(element) || element.tabIndex > -1)
|
26
27
|
break;
|
27
28
|
}
|
28
29
|
}
|
29
|
-
isFocusableElement(element) {
|
30
|
-
return element.matches(FocusBlocker.focusableSelector);
|
31
|
-
}
|
32
30
|
dispose() {
|
33
31
|
if (this.target) {
|
34
32
|
this.removeEventListeners(this.target);
|
@@ -36,18 +34,3 @@ class FocusBlocker {
|
|
36
34
|
}
|
37
35
|
}
|
38
36
|
}
|
39
|
-
_a = FocusBlocker;
|
40
|
-
FocusBlocker.focusableSelectors = [
|
41
|
-
'a[href]',
|
42
|
-
'area[href]',
|
43
|
-
'input',
|
44
|
-
'select',
|
45
|
-
'textarea',
|
46
|
-
'button',
|
47
|
-
'iframe',
|
48
|
-
'object',
|
49
|
-
'embed',
|
50
|
-
'[tabindex]:not([tabindex="-1"])',
|
51
|
-
'[contenteditable]:not([contenteditable="false"])'
|
52
|
-
];
|
53
|
-
FocusBlocker.focusableSelector = _a.focusableSelectors.join(',');
|
@@ -3,8 +3,10 @@ import { LayoutPoint } from '../layout/layout-point';
|
|
3
3
|
import { BatchUpdatableObject } from '@devexpress/utils/lib/class/batch-updatable';
|
4
4
|
import { IEventManager } from '../interfaces/i-event-manager';
|
5
5
|
import { CursorPointer } from '../mouse-handler/mouse-handler/mouse-handler';
|
6
|
+
import { SimpleViewCanvasSizeManager } from './renderes/common/document-renderer';
|
6
7
|
import { ViewManager } from './renderes/view-manager';
|
7
8
|
export declare class CanvasManager extends BatchUpdatableObject {
|
9
|
+
simpleViewCanvasSizeManager: SimpleViewCanvasSizeManager;
|
8
10
|
private viewManager;
|
9
11
|
private eventManager;
|
10
12
|
private scrollIntervalID;
|
@@ -11,7 +11,9 @@ import { RichMouseEvent } from '../event-manager';
|
|
11
11
|
import { MouseEventSource } from '../mouse-handler/mouse-event-source';
|
12
12
|
import { CursorPointer } from '../mouse-handler/mouse-handler/mouse-handler';
|
13
13
|
import { ResizeBoxListener } from './listeners/resize-box-listener';
|
14
|
+
import { SimpleViewCanvasSizeManager } from './renderes/common/document-renderer';
|
14
15
|
import { SizeUtils } from '../utils/size-utils';
|
16
|
+
import { MixedSize } from '../utils/mixed-size';
|
15
17
|
const SCROLL_INTERVAL_MS = 50;
|
16
18
|
const CSSCLASS_FOCUSED = "dxreInFocus";
|
17
19
|
const AUTOSCROLL_AREA_SIZE = 10;
|
@@ -29,6 +31,7 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
29
31
|
this.blockNotPointerEvents = false;
|
30
32
|
this.lastPointerPosition = { x: -1, y: -1 };
|
31
33
|
this.evtHandlersHolder = new DomEventHandlersHolder();
|
34
|
+
this.simpleViewCanvasSizeManager = new SimpleViewCanvasSizeManager(this, viewManager.control);
|
32
35
|
this.viewManager = viewManager;
|
33
36
|
this.eventManager = eventManager;
|
34
37
|
this.initCommonEvents();
|
@@ -47,6 +50,8 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
47
50
|
}
|
48
51
|
dispose() {
|
49
52
|
this.evtHandlersHolder.removeAllListeners();
|
53
|
+
this.simpleViewCanvasSizeManager.dispose();
|
54
|
+
this.simpleViewCanvasSizeManager = null;
|
50
55
|
}
|
51
56
|
onUpdateUnlocked(_occurredEvents) {
|
52
57
|
this.viewManager.canvasListener.updateVisibleParts();
|
@@ -73,7 +78,7 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
73
78
|
DomUtils.removeClassName(this.viewManager.canvas, CSSCLASS_FOCUSED);
|
74
79
|
}
|
75
80
|
getCanvasWidth() {
|
76
|
-
return SizeUtils.getClientWidth(this.viewManager.canvas);
|
81
|
+
return SizeUtils.getClientWidth(this.viewManager.canvas) / this.viewManager.zoomLevel;
|
77
82
|
}
|
78
83
|
onCanvasMouseWheel(evt) {
|
79
84
|
if (!this.viewManager.layout)
|
@@ -235,7 +240,7 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
235
240
|
this.saveMousePosition(evt);
|
236
241
|
}
|
237
242
|
getScale(actualSize, originalSize) {
|
238
|
-
return actualSize != 0 && originalSize != 0 ? actualSize / originalSize : 1;
|
243
|
+
return (actualSize != 0 && originalSize != 0 ? actualSize / originalSize : 1) * this.viewManager.zoomLevel;
|
239
244
|
}
|
240
245
|
getLayoutPoint(evt, checkScroll) {
|
241
246
|
if (!this.viewManager.layout)
|
@@ -244,33 +249,40 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
244
249
|
const clientRect = canvas.getBoundingClientRect();
|
245
250
|
const scaleX = this.getScale(clientRect.width, canvas.offsetWidth);
|
246
251
|
const scaleY = this.getScale(clientRect.height, canvas.offsetHeight);
|
247
|
-
const clientX = EvtUtils.getEventX(evt)
|
248
|
-
const clientY = EvtUtils.getEventY(evt)
|
249
|
-
const canvasX = DomUtils.getAbsolutePositionX(canvas)
|
250
|
-
const canvasY = DomUtils.getAbsolutePositionY(canvas)
|
251
|
-
const offsetY = canvas.scrollTop
|
252
|
-
const pageIndex = this.
|
252
|
+
const clientX = MixedSize.fromUI(EvtUtils.getEventX(evt));
|
253
|
+
const clientY = MixedSize.fromUI(EvtUtils.getEventY(evt));
|
254
|
+
const canvasX = MixedSize.fromUI(DomUtils.getAbsolutePositionX(canvas));
|
255
|
+
const canvasY = MixedSize.fromUI(DomUtils.getAbsolutePositionY(canvas));
|
256
|
+
const offsetY = MixedSize.fromUI(canvas.scrollTop).addSize(clientY).subtractSize(canvasY).useScale(scaleY);
|
257
|
+
const pageIndex = this.viewManager.layout.findPageIndexByOffsetY(offsetY.LayoutSize, this.sizes);
|
258
|
+
const visibleAreaWidth = MixedSize.fromUI(this.sizes.getVisibleAreaWidth(false));
|
259
|
+
const visibleAreaHeight = MixedSize.fromUI(this.sizes.getVisibleAreaHeight(false));
|
253
260
|
if (checkScroll) {
|
254
|
-
|
261
|
+
const relativeX = new MixedSize().useScale(scaleX).addSize(canvasX).addSize(visibleAreaWidth).subtractSize(clientX);
|
262
|
+
if (this.sizes.scrollYVisible && relativeX.LayoutSize < 0)
|
255
263
|
return LayoutPoint.Empty();
|
256
|
-
|
264
|
+
const relativeY = new MixedSize().useScale(scaleY).addSize(canvasY).addSize(visibleAreaHeight).subtractSize(clientY);
|
265
|
+
if (this.sizes.scrollXVisible && relativeY.LayoutSize < 0)
|
257
266
|
return LayoutPoint.Empty();
|
258
267
|
}
|
259
268
|
const layoutPage = this.viewManager.layout.pages[pageIndex];
|
260
269
|
const renderPageCacheElem = this.viewManager.cache[pageIndex];
|
261
270
|
if (!layoutPage || !renderPageCacheElem)
|
262
271
|
return LayoutPoint.Empty();
|
263
|
-
|
272
|
+
const pageX = new MixedSize().useScale(scaleX).addUISize(canvas.scrollLeft).addSize(clientX).subtractSize(canvasX).subtractLayoutSize(renderPageCacheElem.page.offsetLeft).LayoutSize;
|
273
|
+
const pageY = new MixedSize().useScale(scaleY).addSize(offsetY).subtractLayoutSize(this.sizes.getPageOffsetY(layoutPage)).LayoutSize;
|
274
|
+
return new LayoutPoint(pageIndex, pageX, pageY);
|
264
275
|
}
|
265
276
|
isVisiblePosition(layoutPoint) {
|
266
|
-
const
|
267
|
-
this.
|
277
|
+
const layout = this.viewManager.layout;
|
278
|
+
const zoomLevel = this.viewManager.zoomLevel;
|
279
|
+
this.scroll.updatePageIndexesInfo(layout);
|
268
280
|
if (layoutPoint.pageIndex < this.scroll.startVisiblePageIndex || layoutPoint.pageIndex > this.scroll.endVisiblePageIndex)
|
269
281
|
return false;
|
270
|
-
const pageY = this.sizes.getPageOffsetY(pages[layoutPoint.pageIndex]);
|
271
|
-
const pageX = this.viewManager.cache[layoutPoint.pageIndex].page.offsetLeft;
|
272
|
-
const x = pageX
|
273
|
-
const y = pageY
|
282
|
+
const pageY = MixedSize.fromLayout(this.sizes.getPageOffsetY(layout.pages[layoutPoint.pageIndex])).useScale(zoomLevel);
|
283
|
+
const pageX = MixedSize.fromLayout(this.viewManager.cache[layoutPoint.pageIndex].page.offsetLeft).useScale(zoomLevel);
|
284
|
+
const x = pageX.addLayoutSize(layoutPoint.x).UISize;
|
285
|
+
const y = pageY.addLayoutSize(layoutPoint.y).UISize;
|
274
286
|
return x >= this.scroll.lastScrollLeft && x <= this.sizes.getVisibleAreaWidth(false) + this.scroll.lastScrollLeft &&
|
275
287
|
y >= this.scroll.lastScrollTop && y <= this.sizes.getVisibleAreaHeight(false) + this.scroll.lastScrollTop;
|
276
288
|
}
|
@@ -378,10 +390,12 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
378
390
|
return ResizeBoxListener.directionToSource[className.substr(ind + cornerPrefix.length, 2).trim()];
|
379
391
|
}
|
380
392
|
getScrollTopInfo() {
|
381
|
-
const pages = this.viewManager.layout.pages;
|
382
393
|
const scrollTop = this.viewManager.canvas.scrollTop;
|
383
|
-
const pageIndex = this.
|
384
|
-
|
394
|
+
const pageIndex = this.viewManager.layout.findPageIndexByOffsetY(scrollTop, this.sizes);
|
395
|
+
const pages = this.viewManager.layout.pages;
|
396
|
+
const zoomLevel = this.viewManager.zoomLevel;
|
397
|
+
const pageOffsetY = this.sizes.getPageOffsetY(pages[pageIndex]);
|
398
|
+
return new ScrollTopInfo(pageIndex, new MixedSize().useScale(zoomLevel).addUISize(scrollTop).subtractLayoutSize(pageOffsetY).LayoutSize);
|
385
399
|
}
|
386
400
|
}
|
387
401
|
export class ScrollTopInfo {
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import { LayoutPage } from '../layout/main-structures/layout-page';
|
2
1
|
import { BoundaryInterval } from '@devexpress/utils/lib/intervals/boundary';
|
3
2
|
import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
|
4
3
|
import { IInternalApi } from '../internal-api';
|
5
4
|
import { CanvasSizeInfo } from './canvas-size-info';
|
6
|
-
|
5
|
+
import { DocumentLayout } from '../layout/document-layout';
|
6
|
+
import { IModelChangesListener } from '../interfaces/model-changes-listener';
|
7
|
+
import { ModelChange } from '../model/changes/change';
|
8
|
+
export declare class CanvasScrollInfo implements IModelChangesListener {
|
7
9
|
protected static VISIBLE_PAGES_RANGE: number;
|
8
10
|
protected static VISIBLE_PAGES_RANGE_TOUCH: number;
|
9
11
|
protected static VISIBLE_AREA_HEIGHT_MULTIPLIER: number;
|
@@ -17,11 +19,12 @@ export declare class CanvasScrollInfo {
|
|
17
19
|
readonly internalApi: IInternalApi;
|
18
20
|
private _needUpdatePageIndexes;
|
19
21
|
constructor(canvas: HTMLDivElement, sizes: CanvasSizeInfo, internalApi: IInternalApi);
|
22
|
+
modelChanged(change: ModelChange): void;
|
20
23
|
init(canvas: HTMLDivElement, sizes: CanvasSizeInfo): void;
|
21
24
|
getStartRenderPageIndex(): number;
|
22
25
|
getEndRenderPageIndex(): number;
|
23
26
|
renderPageIndexInterval(): FixedInterval;
|
24
|
-
updatePageIndexesInfo(
|
27
|
+
updatePageIndexesInfo(layout: DocumentLayout): void;
|
25
28
|
getVisibleInterval(): BoundaryInterval;
|
26
29
|
private getScrollTop;
|
27
30
|
private getVisibleHeight;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Browser } from '@devexpress/utils/lib/browser';
|
2
2
|
import { BoundaryInterval } from '@devexpress/utils/lib/intervals/boundary';
|
3
3
|
import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
|
4
|
+
import { ModelChangeType } from '../model/changes/enums';
|
4
5
|
export class CanvasScrollInfo {
|
5
6
|
constructor(canvas, sizes, internalApi) {
|
6
7
|
this.lastScrollTop = -1;
|
@@ -11,6 +12,10 @@ export class CanvasScrollInfo {
|
|
11
12
|
this.internalApi = internalApi;
|
12
13
|
this.init(canvas, sizes);
|
13
14
|
}
|
15
|
+
modelChanged(change) {
|
16
|
+
if (change.type == ModelChangeType.ZoomLevelChanged)
|
17
|
+
this.onCanvasSizeChanged();
|
18
|
+
}
|
14
19
|
init(canvas, sizes) {
|
15
20
|
this.canvas = canvas;
|
16
21
|
this.sizes = sizes;
|
@@ -25,16 +30,16 @@ export class CanvasScrollInfo {
|
|
25
30
|
renderPageIndexInterval() {
|
26
31
|
return FixedInterval.fromPositions(this.getStartRenderPageIndex(), this.getEndRenderPageIndex() + 1);
|
27
32
|
}
|
28
|
-
updatePageIndexesInfo(
|
29
|
-
if (!pages.length)
|
33
|
+
updatePageIndexesInfo(layout) {
|
34
|
+
if (!layout.pages.length)
|
30
35
|
return;
|
31
36
|
const scrollTop = this.getScrollTop();
|
32
37
|
this.lastScrollLeft = this.canvas.scrollLeft;
|
33
38
|
if (this.startVisiblePageIndex >= 0 && scrollTop == this.lastScrollTop && !this._needUpdatePageIndexes)
|
34
39
|
return;
|
35
40
|
this._needUpdatePageIndexes = false;
|
36
|
-
this.startVisiblePageIndex =
|
37
|
-
this.endVisiblePageIndex =
|
41
|
+
this.startVisiblePageIndex = layout.findPageIndexByOffsetY(scrollTop, this.sizes);
|
42
|
+
this.endVisiblePageIndex = layout.findPageIndexByOffsetY(scrollTop + this.getVisibleHeight(), this.sizes);
|
38
43
|
this.lastScrollTop = scrollTop;
|
39
44
|
}
|
40
45
|
getVisibleInterval() {
|
@@ -2,7 +2,9 @@ import { IScrollLayoutChangesListener } from '../interfaces/i-selection-layout-c
|
|
2
2
|
import { ICanvasState } from '../scroll/canvas-states';
|
3
3
|
import { IRulerControl } from '../ui/ruler/ruler';
|
4
4
|
import { ViewManager } from './renderes/view-manager';
|
5
|
-
|
5
|
+
import { IModelChangesListener } from '../interfaces/model-changes-listener';
|
6
|
+
import { ModelChange } from '../model/changes/change';
|
7
|
+
export declare class CanvasScrollManager implements IScrollLayoutChangesListener, IModelChangesListener {
|
6
8
|
private updateScrollTimeoutId;
|
7
9
|
private waitForDblClickTimeoutId;
|
8
10
|
private horizontalRuler;
|
@@ -11,6 +13,7 @@ export declare class CanvasScrollManager implements IScrollLayoutChangesListener
|
|
11
13
|
private get sizes();
|
12
14
|
constructor(viewManager: ViewManager, horizontalRuler: IRulerControl);
|
13
15
|
dispose(): void;
|
16
|
+
modelChanged(change: ModelChange): void;
|
14
17
|
get scrollTop(): number;
|
15
18
|
set scrollTop(val: number);
|
16
19
|
setScrollEnabled(enabled: boolean): void;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { DocumentLayoutDetailsLevel } from '../layout/document-layout-details-level';
|
2
2
|
import { MouseHandler } from '../mouse-handler/mouse-handler/mouse-handler';
|
3
3
|
import { RelativePosition } from '../scroll/model-states';
|
4
|
+
import { MixedSize } from '../utils/mixed-size';
|
5
|
+
import { ModelChangeType } from '../model/changes/enums';
|
4
6
|
export class CanvasScrollManager {
|
5
7
|
get canvas() { return this.viewManager.canvas; }
|
6
8
|
get sizes() { return this.viewManager.sizes; }
|
@@ -14,6 +16,10 @@ export class CanvasScrollManager {
|
|
14
16
|
clearTimeout(this.updateScrollTimeoutId);
|
15
17
|
clearTimeout(this.waitForDblClickTimeoutId);
|
16
18
|
}
|
19
|
+
modelChanged(change) {
|
20
|
+
if (change.type == ModelChangeType.ZoomLevelChanged)
|
21
|
+
this.updateScrollVisibility();
|
22
|
+
}
|
17
23
|
get scrollTop() { return this.canvas.scrollTop; }
|
18
24
|
set scrollTop(val) { this.canvas.scrollTop = val; }
|
19
25
|
setScrollEnabled(enabled) {
|
@@ -32,46 +38,48 @@ export class CanvasScrollManager {
|
|
32
38
|
scrollToX(canvasState) {
|
33
39
|
const position = canvasState.lp;
|
34
40
|
const relativePosition = canvasState.relativePosition;
|
35
|
-
|
36
|
-
|
41
|
+
const zoomLevel = this.viewManager.zoomLevel;
|
42
|
+
const page = this.viewManager.layout.pages[position.pageIndex];
|
43
|
+
let y = MixedSize.fromLayout(this.sizes.getPageOffsetY(page)).useScale(zoomLevel);
|
44
|
+
let height = new MixedSize().useScale(zoomLevel);
|
37
45
|
if (position.detailsLevel >= DocumentLayoutDetailsLevel.PageArea) {
|
38
|
-
y
|
46
|
+
y.addLayoutSize(position.pageArea.y);
|
39
47
|
if (position.detailsLevel >= DocumentLayoutDetailsLevel.Column) {
|
40
|
-
y
|
48
|
+
y.addLayoutSize(position.column.y);
|
41
49
|
if (position.detailsLevel >= DocumentLayoutDetailsLevel.Row) {
|
42
|
-
y
|
50
|
+
y.addLayoutSize(position.row.y);
|
43
51
|
if (relativePosition === RelativePosition.Bottom)
|
44
|
-
y
|
52
|
+
y.addLayoutSize(position.row.height);
|
45
53
|
else if (relativePosition === RelativePosition.Inside)
|
46
|
-
height
|
54
|
+
height.clear().addLayoutSize(position.row.height);
|
47
55
|
}
|
48
56
|
else if (relativePosition === RelativePosition.Bottom)
|
49
|
-
y
|
57
|
+
y.addLayoutSize(position.column.height);
|
50
58
|
else if (relativePosition === RelativePosition.Inside)
|
51
|
-
height
|
59
|
+
height.clear().addLayoutSize(position.column.height);
|
52
60
|
}
|
53
61
|
else if (relativePosition === RelativePosition.Bottom)
|
54
|
-
y
|
62
|
+
y.addLayoutSize(position.pageArea.height);
|
55
63
|
else if (relativePosition === RelativePosition.Inside)
|
56
|
-
height
|
64
|
+
height.clear().addLayoutSize(position.pageArea.height);
|
57
65
|
}
|
58
66
|
else if (relativePosition === RelativePosition.Bottom)
|
59
|
-
y
|
67
|
+
y.addLayoutSize(position.page.height);
|
60
68
|
else if (relativePosition === RelativePosition.Inside)
|
61
|
-
height
|
69
|
+
height.clear().addLayoutSize(position.page.height);
|
62
70
|
if (relativePosition === RelativePosition.Bottom)
|
63
|
-
y
|
64
|
-
y
|
71
|
+
y.subtractUISize(this.sizes.getVisibleAreaHeight(false));
|
72
|
+
y.addUISize(canvasState.getVerticalOffset(this.sizes));
|
65
73
|
if (relativePosition === RelativePosition.Inside) {
|
66
74
|
let scrollTop = this.canvas.scrollTop;
|
67
75
|
const scrollVisibleAreaHeight = this.sizes.getVisibleAreaHeight(false);
|
68
|
-
if (y < scrollTop)
|
69
|
-
this.canvas.scrollTop = y;
|
70
|
-
else if (y + height > scrollVisibleAreaHeight + scrollTop)
|
71
|
-
this.canvas.scrollTop = y + height - scrollVisibleAreaHeight;
|
76
|
+
if (y.UISize < scrollTop)
|
77
|
+
this.canvas.scrollTop = y.UISize;
|
78
|
+
else if (y.UISize + height.UISize > scrollVisibleAreaHeight + scrollTop)
|
79
|
+
this.canvas.scrollTop = y.UISize + height.UISize - scrollVisibleAreaHeight;
|
72
80
|
}
|
73
81
|
else
|
74
|
-
this.canvas.scrollTop = y;
|
82
|
+
this.canvas.scrollTop = y.UISize;
|
75
83
|
}
|
76
84
|
NotifyScrollPositionChanged(canvasState) {
|
77
85
|
if (this.updateScrollTimeoutId) {
|