@univerjs/engine-render 0.3.0 → 0.4.0-alpha.0
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +334 -197
- package/lib/types/basics/draw.d.ts +5 -6
- package/lib/types/basics/tools.d.ts +1 -1
- package/lib/types/components/docs/doc-component.d.ts +1 -1
- package/lib/types/components/docs/document.d.ts +1 -1
- package/lib/types/components/docs/layout/doc-skeleton.d.ts +3 -3
- package/lib/types/components/extension.d.ts +3 -2
- package/lib/types/components/sheets/constants.d.ts +20 -0
- package/lib/types/components/sheets/extensions/background.d.ts +16 -2
- package/lib/types/components/sheets/extensions/border.d.ts +17 -3
- package/lib/types/components/sheets/extensions/column-header-layout.d.ts +1 -1
- package/lib/types/components/sheets/extensions/font.d.ts +26 -3
- package/lib/types/components/sheets/interfaces.d.ts +2 -2
- package/lib/types/components/sheets/sheet-skeleton.d.ts +8 -2
- package/lib/types/components/sheets/spreadsheet.d.ts +3 -3
- package/lib/types/context.d.ts +1 -0
- package/lib/types/engine.d.ts +3 -3
- package/lib/types/scene.d.ts +6 -4
- package/lib/types/thin-engine.d.ts +1 -1
- package/lib/types/viewport.d.ts +4 -4
- package/lib/umd/index.js +1 -1
- package/package.json +9 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IPosition, BorderStyleTypes } from '@univerjs/core';
|
|
2
2
|
import { UniverRenderingContext } from '../context';
|
|
3
|
-
import { BORDER_TYPE, ORIENTATION_TYPE } from './const';
|
|
4
3
|
import { IDocumentSkeletonLine } from './i-document-skeleton-cached';
|
|
4
|
+
import { BORDER_TYPE as BORDER_LTRB, ORIENTATION_TYPE } from './const';
|
|
5
5
|
import { Vector2 } from './vector2';
|
|
6
6
|
export interface IContext2D extends CanvasRenderingContext2D {
|
|
7
7
|
webkitBackingStorePixelRatio: number;
|
|
@@ -18,9 +18,9 @@ export declare function getDevicePixelRatio(): number;
|
|
|
18
18
|
* @param lineWidthBuffer Solving the problem of mitered corners in the drawing of borders thicker than 2 pixels, caused by the line segments being centered.
|
|
19
19
|
* @param position border draw position
|
|
20
20
|
*/
|
|
21
|
-
export declare function drawLineByBorderType(ctx: UniverRenderingContext, type:
|
|
22
|
-
export declare function drawDiagonalLineByBorderType(ctx: UniverRenderingContext, type:
|
|
23
|
-
export declare function clearLineByBorderType(ctx: UniverRenderingContext, type:
|
|
21
|
+
export declare function drawLineByBorderType(ctx: UniverRenderingContext, type: BORDER_LTRB, lineWidthBuffer: number, position: IPosition): void;
|
|
22
|
+
export declare function drawDiagonalLineByBorderType(ctx: UniverRenderingContext, type: BORDER_LTRB, position: IPosition): void;
|
|
23
|
+
export declare function clearLineByBorderType(ctx: UniverRenderingContext, type: BORDER_LTRB, position: IPosition): void;
|
|
24
24
|
export declare function setLineType(ctx: UniverRenderingContext, style: BorderStyleTypes): void;
|
|
25
25
|
export declare function getLineOffset(): number;
|
|
26
26
|
export declare function getLineWith(width: number): number;
|
|
@@ -37,8 +37,7 @@ export declare function getRotateOffsetAndFarthestHypotenuse(lines: IDocumentSke
|
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Align the resolution, an alignment needs to be done in special cases where the resolution is 1.5, 1.25, etc.
|
|
40
|
-
* @
|
|
41
|
-
* @returns
|
|
40
|
+
* @returns {left: number, top: number} offset
|
|
42
41
|
*/
|
|
43
42
|
export declare function getTranslateInSpreadContextWithPixelRatio(): {
|
|
44
43
|
left: number;
|
|
@@ -147,7 +147,7 @@ export declare function inRowViewRanges(ranges: IRange[], rowIndex: number): boo
|
|
|
147
147
|
* @param {IRange[]} ranges
|
|
148
148
|
*/
|
|
149
149
|
export declare function expandRangeIfIntersects(mainRanges: IRange[], ranges: IRange[]): IRange[];
|
|
150
|
-
export declare function
|
|
150
|
+
export declare function clampRange(range: IRange): {
|
|
151
151
|
startRow: number;
|
|
152
152
|
startColumn: number;
|
|
153
153
|
endRow: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IDocumentSkeletonGlyph, IDocumentSkeletonLine, IDocumentSkeletonPage, PageLayoutType } from '../../basics/i-document-skeleton-cached';
|
|
2
2
|
import { IBoundRectNoAngle, IViewportInfo } from '../../basics/vector2';
|
|
3
3
|
import { UniverRenderingContext } from '../../context';
|
|
4
|
-
import { RenderComponent } from '../component';
|
|
5
4
|
import { DOCS_EXTENSION_TYPE } from './doc-extension';
|
|
6
5
|
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
6
|
+
import { RenderComponent } from '../component';
|
|
7
7
|
export interface IPageMarginLayout {
|
|
8
8
|
pageMarginLeft: number;
|
|
9
9
|
pageMarginTop: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
|
2
|
-
import { DocComponent, IDocumentsConfig, IPageMarginLayout } from './doc-component';
|
|
3
2
|
import { IDocumentSkeletonPage } from '../../basics/i-document-skeleton-cached';
|
|
4
3
|
import { Transform } from '../../basics/transform';
|
|
5
4
|
import { IViewportInfo } from '../../basics/vector2';
|
|
6
5
|
import { UniverRenderingContext } from '../../context';
|
|
6
|
+
import { IDocumentsConfig, IPageMarginLayout, DocComponent } from './doc-component';
|
|
7
7
|
import { DocumentSkeleton } from './layout/doc-skeleton';
|
|
8
8
|
export interface IPageRenderConfig {
|
|
9
9
|
page: IDocumentSkeletonPage;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LocaleService, Nullable } from '@univerjs/core';
|
|
2
|
-
import {
|
|
3
|
-
import { Skeleton } from '../../skeleton';
|
|
4
|
-
import { DocumentEditArea, DocumentViewModel } from '../view-model/document-view-model';
|
|
2
|
+
import { IDocumentSkeletonCached, IDocumentSkeletonGlyph, IDocumentSkeletonPage, PageLayoutType } from '../../../basics/i-document-skeleton-cached';
|
|
5
3
|
import { INodeInfo, INodePosition, INodeSearch } from '../../../basics/interfaces';
|
|
6
4
|
import { IViewportInfo, Vector2 } from '../../../basics/vector2';
|
|
5
|
+
import { DocumentViewModel, DocumentEditArea } from '../view-model/document-view-model';
|
|
6
|
+
import { Skeleton } from '../../skeleton';
|
|
7
7
|
export declare enum DocumentSkeletonState {
|
|
8
8
|
PENDING = "pending",
|
|
9
9
|
CALCULATING = "calculating",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDocumentRenderConfig, IRange, IScale, Nullable, Registry } from '@univerjs/core';
|
|
2
2
|
import { BaseObject } from '../base-object';
|
|
3
|
-
import { Vector2 } from '../basics/vector2';
|
|
3
|
+
import { IBoundRectNoAngle, Vector2 } from '../basics/vector2';
|
|
4
4
|
import { UniverRenderingContext } from '../context';
|
|
5
5
|
export interface IExtensionConfig {
|
|
6
6
|
originTranslate?: Vector2;
|
|
@@ -14,6 +14,7 @@ export interface IDrawInfo {
|
|
|
14
14
|
viewRanges: IRange[];
|
|
15
15
|
viewportKey: string;
|
|
16
16
|
checkOutOfViewBound?: boolean;
|
|
17
|
+
viewBound?: IBoundRectNoAngle;
|
|
17
18
|
}
|
|
18
19
|
export declare class ComponentExtension<T, U, V> {
|
|
19
20
|
uKey: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const BORDER_Z_INDEX = 50;
|
|
17
|
+
export declare const FONT_EXTENSION_Z_INDEX = 45;
|
|
18
|
+
export declare const BG_Z_INDEX = 21;
|
|
19
|
+
export declare const PRINTING_BG_Z_INDEX = 21;
|
|
20
|
+
export declare const EXPAND_SIZE_FOR_RENDER_OVERFLOW = 20;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import { IRange, IScale } from '@univerjs/core';
|
|
2
|
-
import { SheetExtension } from './sheet-extension';
|
|
1
|
+
import { IRange, IScale, ISelectionCellWithMergeInfo, ObjectMatrix } from '@univerjs/core';
|
|
3
2
|
import { UniverRenderingContext } from '../../../context';
|
|
4
3
|
import { IDrawInfo } from '../../extension';
|
|
5
4
|
import { SpreadsheetSkeleton } from '../sheet-skeleton';
|
|
5
|
+
import { SheetExtension } from './sheet-extension';
|
|
6
|
+
interface IRenderBGContext {
|
|
7
|
+
ctx: UniverRenderingContext;
|
|
8
|
+
spreadsheetSkeleton: SpreadsheetSkeleton;
|
|
9
|
+
backgroundPositions: ObjectMatrix<ISelectionCellWithMergeInfo>;
|
|
10
|
+
checkOutOfViewBound: boolean;
|
|
11
|
+
backgroundPaths: Path2D;
|
|
12
|
+
scaleX: number;
|
|
13
|
+
scaleY: number;
|
|
14
|
+
viewRanges: IRange[];
|
|
15
|
+
diffRanges: IRange[];
|
|
16
|
+
cellInfo: ISelectionCellWithMergeInfo;
|
|
17
|
+
}
|
|
6
18
|
export declare class Background extends SheetExtension {
|
|
7
19
|
uKey: string;
|
|
8
20
|
Z_INDEX: number;
|
|
9
21
|
PRINTING_Z_INDEX: number;
|
|
10
22
|
get zIndex(): number;
|
|
11
23
|
draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges: IRange[], { viewRanges, checkOutOfViewBound }: IDrawInfo): void;
|
|
24
|
+
renderBGByCell(bgContext: IRenderBGContext, row: number, col: number): true | undefined;
|
|
12
25
|
}
|
|
26
|
+
export {};
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import { IRange, IScale } from '@univerjs/core';
|
|
2
|
-
import { SheetExtension } from './sheet-extension';
|
|
1
|
+
import { IRange, IScale, ObjectMatrix, BorderStyleTypes } from '@univerjs/core';
|
|
3
2
|
import { UniverRenderingContext } from '../../../context';
|
|
3
|
+
import { IDrawInfo } from '../../extension';
|
|
4
|
+
import { BorderCache } from '../interfaces';
|
|
4
5
|
import { SpreadsheetSkeleton } from '../sheet-skeleton';
|
|
6
|
+
import { SheetExtension } from './sheet-extension';
|
|
7
|
+
interface IRenderBorderContext {
|
|
8
|
+
ctx: UniverRenderingContext;
|
|
9
|
+
overflowCache: ObjectMatrix<IRange>;
|
|
10
|
+
precisionScale: number;
|
|
11
|
+
spreadsheetSkeleton: SpreadsheetSkeleton;
|
|
12
|
+
diffRanges: IRange[];
|
|
13
|
+
viewRanges: IRange[];
|
|
14
|
+
}
|
|
5
15
|
export declare class Border extends SheetExtension {
|
|
6
16
|
uKey: string;
|
|
7
17
|
Z_INDEX: number;
|
|
8
|
-
|
|
18
|
+
preStyle: BorderStyleTypes;
|
|
19
|
+
preColor: string;
|
|
20
|
+
draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges: IRange[], { viewRanges }: IDrawInfo): void;
|
|
21
|
+
renderBorderByCell(renderBorderContext: IRenderBorderContext, row: number, col: number, borderCacheItem: BorderCache): true | undefined;
|
|
9
22
|
private _getOverflowExclusion;
|
|
10
23
|
}
|
|
24
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IScale } from '@univerjs/core';
|
|
2
2
|
import { UniverRenderingContext } from '../../../context';
|
|
3
|
-
import { SpreadsheetSkeleton } from '../sheet-skeleton';
|
|
4
3
|
import { IAColumnCfg, IAColumnCfgObj, IColumnStyleCfg } from '../interfaces';
|
|
4
|
+
import { SpreadsheetSkeleton } from '../sheet-skeleton';
|
|
5
5
|
import { SheetExtension } from './sheet-extension';
|
|
6
6
|
export interface IColumnsHeaderCfgParam {
|
|
7
7
|
headerStyle?: Partial<IColumnStyleCfg>;
|
|
@@ -1,13 +1,36 @@
|
|
|
1
|
-
import { IRange, IScale } from '@univerjs/core';
|
|
2
|
-
import { SpreadsheetSkeleton } from '../sheet-skeleton';
|
|
3
|
-
import { SheetExtension } from './sheet-extension';
|
|
1
|
+
import { ICellDataForSheetInterceptor, IRange, IScale, ISelectionCellWithMergeInfo, Nullable, ObjectMatrix } from '@univerjs/core';
|
|
4
2
|
import { UniverRenderingContext } from '../../../context';
|
|
5
3
|
import { IDrawInfo } from '../../extension';
|
|
4
|
+
import { IFontCacheItem } from '../interfaces';
|
|
5
|
+
import { SpreadsheetSkeleton } from '../sheet-skeleton';
|
|
6
|
+
import { SheetExtension } from './sheet-extension';
|
|
7
|
+
interface IRenderFontContext {
|
|
8
|
+
ctx: UniverRenderingContext;
|
|
9
|
+
scale: number;
|
|
10
|
+
rowHeightAccumulation: number[];
|
|
11
|
+
columnTotalWidth: number;
|
|
12
|
+
columnWidthAccumulation: number[];
|
|
13
|
+
rowTotalHeight: number;
|
|
14
|
+
viewRanges: IRange[];
|
|
15
|
+
checkOutOfViewBound: boolean;
|
|
16
|
+
diffRanges: IRange[];
|
|
17
|
+
spreadsheetSkeleton: SpreadsheetSkeleton;
|
|
18
|
+
overflowRectangle: Nullable<IRange>;
|
|
19
|
+
cellData: ICellDataForSheetInterceptor;
|
|
20
|
+
startY: number;
|
|
21
|
+
endY: number;
|
|
22
|
+
startX: number;
|
|
23
|
+
endX: number;
|
|
24
|
+
cellInfo: ISelectionCellWithMergeInfo;
|
|
25
|
+
}
|
|
6
26
|
export declare class Font extends SheetExtension {
|
|
7
27
|
uKey: string;
|
|
8
28
|
Z_INDEX: number;
|
|
9
29
|
getDocuments(): any;
|
|
10
30
|
draw(ctx: UniverRenderingContext, parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges: IRange[], moreBoundsInfo: IDrawInfo): void;
|
|
31
|
+
renderFontEachCell(renderFontContext: IRenderFontContext, row: number, col: number, fontMatrix: ObjectMatrix<IFontCacheItem>): true | undefined;
|
|
32
|
+
private _clipTextOverflow;
|
|
11
33
|
private _renderDocuments;
|
|
12
34
|
private _clipRectangleForOverflow;
|
|
13
35
|
}
|
|
36
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BorderStyleTypes, HorizontalAlign, ISelectionCellWithMergeInfo, ObjectMatrix, VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
2
|
-
import { BORDER_TYPE } from '../../basics/const';
|
|
2
|
+
import { BORDER_TYPE as BORDER_LTRB } from '../../basics/const';
|
|
3
3
|
import { Canvas } from '../../canvas';
|
|
4
4
|
import { UniverRenderingContext } from '../../context';
|
|
5
5
|
import { DocumentSkeleton } from '../docs/layout/doc-skeleton';
|
|
@@ -7,7 +7,7 @@ export interface BorderCache {
|
|
|
7
7
|
[key: string]: BorderCacheItem | {};
|
|
8
8
|
}
|
|
9
9
|
export interface BorderCacheItem {
|
|
10
|
-
type:
|
|
10
|
+
type: BORDER_LTRB;
|
|
11
11
|
style: BorderStyleTypes;
|
|
12
12
|
color: string;
|
|
13
13
|
}
|
|
@@ -51,7 +51,7 @@ export declare class SpreadsheetSkeleton extends Skeleton {
|
|
|
51
51
|
/**
|
|
52
52
|
* Range of visible area(range in viewBounds)
|
|
53
53
|
*/
|
|
54
|
-
private
|
|
54
|
+
private _visibleRange;
|
|
55
55
|
private _overflowCache;
|
|
56
56
|
private _stylesCache;
|
|
57
57
|
/** A matrix to store if a (row, column) position has render cache. */
|
|
@@ -78,6 +78,7 @@ export declare class SpreadsheetSkeleton extends Skeleton {
|
|
|
78
78
|
* Range of visible area(range in viewBounds)
|
|
79
79
|
*/
|
|
80
80
|
get rowColumnSegment(): IRowColumnRange;
|
|
81
|
+
get visibleArea(): IRowColumnRange;
|
|
81
82
|
get stylesCache(): IStylesCache;
|
|
82
83
|
get overflowCache(): ObjectMatrix<IRange>;
|
|
83
84
|
get showGridlines(): BooleanNumber;
|
|
@@ -201,6 +202,12 @@ export declare class SpreadsheetSkeleton extends Skeleton {
|
|
|
201
202
|
* @param column Specified Column Coordinate
|
|
202
203
|
*/
|
|
203
204
|
getCellByIndex(row: number, column: number): ISelectionCellWithMergeInfo;
|
|
205
|
+
/**
|
|
206
|
+
* New merge info, but position without header.
|
|
207
|
+
* @param row
|
|
208
|
+
* @param column
|
|
209
|
+
* @returns {ISelectionCellWithMergeInfo} cellInfo with merge info
|
|
210
|
+
*/
|
|
204
211
|
getCellByIndexWithNoHeader(row: number, column: number): ISelectionCellWithMergeInfo;
|
|
205
212
|
convertTransformToOffsetX(offsetX: number, scaleX: number, scrollXY: {
|
|
206
213
|
x: number;
|
|
@@ -246,7 +253,6 @@ export declare class SpreadsheetSkeleton extends Skeleton {
|
|
|
246
253
|
private _getOverflowBound;
|
|
247
254
|
intersectMergeRange(row: number, column: number): boolean;
|
|
248
255
|
/**
|
|
249
|
-
* @deprecated use _getCellMergeInfo instead.
|
|
250
256
|
* get the current row and column segment visible merge data
|
|
251
257
|
* @returns {IRange} The visible merge data
|
|
252
258
|
*/
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { IRange } from '@univerjs/core';
|
|
2
|
-
import { Documents } from '../docs/document';
|
|
3
|
-
import { IPaintForRefresh, IPaintForScrolling, SHEET_VIEWPORT_KEY } from './interfaces';
|
|
4
|
-
import { SheetComponent } from './sheet-component';
|
|
5
2
|
import { IBoundRectNoAngle, IViewportInfo, Vector2 } from '../../basics/vector2';
|
|
6
3
|
import { Canvas } from '../../canvas';
|
|
7
4
|
import { UniverRenderingContext2D } from '../../context';
|
|
@@ -10,6 +7,9 @@ import { Background } from './extensions/background';
|
|
|
10
7
|
import { Border } from './extensions/border';
|
|
11
8
|
import { Font } from './extensions/font';
|
|
12
9
|
import { SpreadsheetSkeleton } from './sheet-skeleton';
|
|
10
|
+
import { Documents } from '../docs/document';
|
|
11
|
+
import { IPaintForRefresh, IPaintForScrolling, SHEET_VIEWPORT_KEY } from './interfaces';
|
|
12
|
+
import { SheetComponent } from './sheet-component';
|
|
13
13
|
export declare class Spreadsheet extends SheetComponent {
|
|
14
14
|
private _allowCache;
|
|
15
15
|
private _backgroundExtension;
|
package/lib/types/context.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class UniverRenderingContext2D implements CanvasRenderingContext2
|
|
|
17
17
|
__mode: string;
|
|
18
18
|
private _system;
|
|
19
19
|
private _browser;
|
|
20
|
+
private _transformCache;
|
|
20
21
|
readonly canvas: HTMLCanvasElement;
|
|
21
22
|
_context: CanvasRenderingContext2D;
|
|
22
23
|
private _systemType;
|
package/lib/types/engine.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Observable, Subject } from 'rxjs';
|
|
2
|
-
import { Canvas, CanvasRenderMode } from './canvas';
|
|
3
|
-
import { ThinEngine } from './thin-engine';
|
|
4
1
|
import { CURSOR_TYPE } from './basics/const';
|
|
5
2
|
import { ITimeMetric } from './basics/interfaces';
|
|
6
3
|
import { IBasicFrameInfo } from './basics/performance-monitor';
|
|
7
4
|
import { Scene } from './scene';
|
|
5
|
+
import { Observable, Subject } from 'rxjs';
|
|
6
|
+
import { Canvas, CanvasRenderMode } from './canvas';
|
|
7
|
+
import { ThinEngine } from './thin-engine';
|
|
8
8
|
export declare class Engine extends ThinEngine<Scene> {
|
|
9
9
|
renderEvenInBackground: boolean;
|
|
10
10
|
private readonly _beginFrame$;
|
package/lib/types/scene.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
|
2
|
-
import { CURSOR_TYPE } from './basics/const';
|
|
3
|
-
import { Layer } from './layer';
|
|
4
|
-
import { Transformer } from './scene.transformer';
|
|
5
|
-
import { ThinScene } from './thin-scene';
|
|
6
2
|
import { BaseObject } from './base-object';
|
|
7
3
|
import { IDragEvent, IKeyboardEvent, IMouseEvent, IPointerEvent, IWheelEvent } from './basics/i-events';
|
|
8
4
|
import { ISceneTransformState } from './basics/interfaces';
|
|
@@ -14,6 +10,10 @@ import { Engine } from './engine';
|
|
|
14
10
|
import { SceneViewer } from './scene-viewer';
|
|
15
11
|
import { ThinEngine } from './thin-engine';
|
|
16
12
|
import { Viewport } from './viewport';
|
|
13
|
+
import { CURSOR_TYPE } from './basics/const';
|
|
14
|
+
import { Layer } from './layer';
|
|
15
|
+
import { Transformer } from './scene.transformer';
|
|
16
|
+
import { ThinScene } from './thin-scene';
|
|
17
17
|
export declare class Scene extends ThinScene {
|
|
18
18
|
private _parent;
|
|
19
19
|
private _layers;
|
|
@@ -24,6 +24,8 @@ export declare class Scene extends ThinScene {
|
|
|
24
24
|
readonly addObject$: import('rxjs').Observable<Scene>;
|
|
25
25
|
private _beforeRender$;
|
|
26
26
|
readonly beforeRender$: import('rxjs').Observable<Nullable<Canvas>>;
|
|
27
|
+
private _afterRender$;
|
|
28
|
+
readonly afterRender$: import('rxjs').Observable<Nullable<Canvas>>;
|
|
27
29
|
/**
|
|
28
30
|
* Transformer constructor. Transformer is a special type of group that allow you transform
|
|
29
31
|
* primitives and shapes. Transforming tool is not changing `width` and `height` properties of nodes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, EventSubject
|
|
1
|
+
import { IDisposable, Disposable, EventSubject } from '@univerjs/core';
|
|
2
2
|
import { CURSOR_TYPE, RENDER_CLASS_TYPE } from './basics/const';
|
|
3
3
|
import { IEvent } from './basics/i-events';
|
|
4
4
|
import { ITransformChangeState } from './basics/interfaces';
|
package/lib/types/viewport.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Transform } from './basics/transform';
|
|
3
|
-
import { Vector2, IBoundRectNoAngle, IViewportInfo } from './basics/vector2';
|
|
1
|
+
import { EventState, IPosition, Nullable, EventSubject } from '@univerjs/core';
|
|
4
2
|
import { BaseObject } from './base-object';
|
|
5
3
|
import { IWheelEvent } from './basics/i-events';
|
|
4
|
+
import { IBoundRectNoAngle, IViewportInfo, Vector2 } from './basics/vector2';
|
|
6
5
|
import { UniverRenderingContext } from './context';
|
|
7
6
|
import { BaseScrollBar } from './shape/base-scroll-bar';
|
|
8
7
|
import { ThinScene } from './thin-scene';
|
|
8
|
+
import { Transform } from './basics/transform';
|
|
9
9
|
interface IViewPosition {
|
|
10
10
|
top?: number;
|
|
11
11
|
left?: number;
|
|
@@ -348,7 +348,7 @@ export declare class Viewport {
|
|
|
348
348
|
* Update scroll when viewport is resizing and removing rol & col
|
|
349
349
|
*/
|
|
350
350
|
private _updateScrollByViewportScrollValue;
|
|
351
|
-
private
|
|
351
|
+
private _calcViewPortSize;
|
|
352
352
|
/**
|
|
353
353
|
* update pre scroll value has handled in updateScroll()
|
|
354
354
|
*/
|