Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(base-slide): fix canvas

tonytonychopper1236b76a2dd0577
diff --git a/packages/base-docs/src/View/UI/DocContainer/DocContainer.tsx b/packages/base-docs/src/View/UI/DocContainer/DocContainer.tsx
index 348cc5909b..cea24c670e 100644
--- a/packages/base-docs/src/View/UI/DocContainer/DocContainer.tsx
+++ b/packages/base-docs/src/View/UI/DocContainer/DocContainer.tsx
@@ -152,7 +152,7 @@ export const defaultLayout: ILayout = {
footer: true,
- innerLeft: true,
+ innerLeft: false,
innerRight: false,
@@ -652,7 +652,13 @@ export class DocContainer extends Component<BaseDocContainerProps, IState> {
<ToolBar toolList={[]}></ToolBar>
</Header>
<Layout>
- <Sider></Sider>
+ <Sider
+ style={{
+ display: layout.innerLeft ? 'block' : 'none',
+ }}
+ >
+ {/* innerLeft */}
+ </Sider>
<Content className={layout.contentSplit === 'vertical' ? style.contentContainerVertical : style.contentContainerHorizontal}>
{/* extend main content */}
{mainList.map((item: IMainState, i) => {
diff --git a/packages/base-sheets/src/Controller/SheetContainerController.ts b/packages/base-sheets/src/Controller/SheetContainerController.ts
index 3d3b0a1ebc..92644dd3a8 100644
--- a/packages/base-sheets/src/Controller/SheetContainerController.ts
+++ b/packages/base-sheets/src/Controller/SheetContainerController.ts
@@ -1,5 +1,6 @@
import { BooleanNumber, CommandManager, ISheetActionData, SheetActionBase } from '@univer/core';
import { BaseComponentSheet, BaseComponentRender } from '@univer/base-component';
+import { CellRangeModal } from '@univer/style-universheet';
import { SheetPlugin } from '../SheetPlugin';
export class SheetContainerController {
@@ -93,6 +94,6 @@ export class SheetContainerController {
for (let k in registerIcon) {
this._plugin.registerComponent(k, registerIcon[k]);
}
- // this._plugin.registerModal(CellRangeModal.name, CellRangeModal);
+ this._plugin.registerModal(CellRangeModal.name, CellRangeModal);
}
}
diff --git a/packages/base-sheets/src/SheetPlugin.tsx b/packages/base-sheets/src/SheetPlugin.tsx
index f61b7a6336..e06e800983 100644
--- a/packages/base-sheets/src/SheetPlugin.tsx
+++ b/packages/base-sheets/src/SheetPlugin.tsx
@@ -148,8 +148,8 @@ export class SheetPlugin extends Plugin<SheetPluginObserve, SheetContext> {
const layout = this._config.layout as ILayout;
- this._sheetContainerController = new SheetContainerController(this);
this._modalGroupController = new ModalGroupController(this);
+ this._sheetContainerController = new SheetContainerController(this);
// TODO rightMenu config
this._rightMenuControl = new RightMenuController(this);
diff --git a/packages/base-slides/src/Basic/DemoData.ts b/packages/base-slides/src/Basic/DemoData.ts
new file mode 100644
index 0000000000..e497d1c745
--- /dev/null
+++ b/packages/base-slides/src/Basic/DemoData.ts
@@ -0,0 +1,408 @@
+import {
+ BaselineOffset,
+ BlockType,
+ BooleanNumber,
+ BulletAlignment,
+ GlyphType,
+ IDocumentData,
+ ObjectRelativeFromH,
+ ObjectRelativeFromV,
+ ParagraphElementType,
+ PositionedObjectLayoutType,
+ WrapTextType,
+} from '@univer/core';
+
+export const docsDemoData: IDocumentData = {
+ documentId: 'd',
+ drawings: {
+ shapeTest1: {
+ objectId: 'shapeTest1',
+ objectProperties: {
+ title: 'test shape',
+ description: 'test shape',
+ size: {
+ width: 100,
+ height: 400,
+ },
+ positionH: {
+ relativeFrom: ObjectRelativeFromH.COLUMN,
+ posOffset: 100,
+ },
+ positionV: {
+ relativeFrom: ObjectRelativeFromV.PARAGRAPH,
+ posOffset: 160,
+ },
+ angle: 0,
+ imageProperties: {
+ contentUrl: 'https://cnbabylon.com/assets/img/agents.png',
+ },
+ },
+ layoutType: PositionedObjectLayoutType.WRAP_SQUARE,
+ behindDoc: BooleanNumber.FALSE,
+ wrapText: WrapTextType.BOTH_SIDES,
+ },
+ },
+ lists: {
+ unorderedTest: {
+ listId: 'unorderedTest',
+ nestingLevel: [
+ {
+ bulletAlignment: BulletAlignment.START,
+ glyphFormat: ' %0',
+ textStyle: {
+ fs: 12,
+ },
+ startNumber: 0,
+ glyphSymbol: '\u25CF',
+ hanging: 21,
+ indentStart: 21,
+ },
+ {
+ bulletAlignment: BulletAlignment.START,
+ glyphFormat: ' %1',
+ textStyle: {
+ fs: 12,
+ },
+ startNumber: 0,
+ glyphSymbol: '\u25A0',
+ hanging: 21,
+ indentStart: 42,
+ },
+ {
+ bulletAlignment: BulletAlignment.START,
+ glyphFormat: ' %1',
+ textStyle: {
+ fs: 12,
+ },
+ startNumber: 0,
+ glyphSymbol: '\u25C6',
+ hanging: 21,
+ indentStart: 63,
+ },
+ ],
+ },
+ testBullet: {
+ listId: 'testBullet',
+ nestingLevel: [
+ {
+ bulletAlignment: BulletAlignment.START,
+ glyphFormat: ' %1.',
+ textStyle: {
+ fs: 12,
+ },
+ startNumber: 0,
+ glyphType: GlyphType.ROMAN,
+ hanging: 21,
+ indentStart: 21,
+ },
+ {
+ bulletAlignment: BulletAlignment.START,
+ glyphFormat: ' %1.%2)',
+ textStyle: {
+ fs: 12,
+ },
+ startNumber: 0,
+ glyphType: GlyphType.ROMAN,
+ hanging: 21,
+ indentStart: 42,
+ },
+ {
+ bulletAlignment: BulletAlignment.START,
+ glyphFormat: ' %1.%2.%3.',
+ textStyle: {
+ fs: 12,
+ },
+ startNumber: 0,
+ glyphType: GlyphType.ROMAN,
+ hanging: 21,
+ indentStart: 63,
+ },
+ ],
+ },
+ },
+ body: {
+ blockElements: {
+ oneParagraph: {
+ blockId: 'oneParagraph',
+ st: 0,
+ ed: 15,
+ blockType: BlockType.PARAGRAPH,
+ paragraph: {
+ bullet: {
+ listId: 'testBullet',
+ nestingLevel: 0,
+ textStyle: {
+ fs: 20,
+ },
+ },
+ elements: {
+ oneElement: {
+ eId: 'oneElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '在“第1题”工作表中完成以下操作',
+ ts: {
+ fs: 12,
+ bg: {
+ rgb: 'rgb(200,0,90)',
+ },
+ cl: {
+ rgb: 'rgb(255,130,0)',
+ },
+ },
+ },
+ },
+ smallSub: {
+ eId: 'smallSub',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '上标',
+ ts: {
+ fs: 14,
+ bg: {
+ rgb: 'rgb(2,128,2)',
+ },
+ cl: {
+ rgb: 'rgb(0,1,55)',
+ },
+ va: BaselineOffset.SUPERSCRIPT,
+ },
+ },
+ },
+ twoElement: {
+ eId: 'twoElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '日期列单元格数据验证,限制只能输入日期(介于1949年1月1日至2099年1月1日)',
+ ts: {
+ fs: 14,
+ bg: {
+ rgb: 'rgb(90,128,255)',
+ },
+ cl: {
+ rgb: 'rgb(0,1,255)',
+ },
+ },
+ },
+ },
+ },
+ elementOrder: [
+ {
+ elementId: 'oneElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ {
+ elementId: 'shapeTest1',
+ paragraphElementType: ParagraphElementType.DRAWING,
+ },
+ {
+ elementId: 'smallSub',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ {
+ elementId: 'twoElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ ],
+ },
+ },
+ twoParagraph: {
+ blockId: 'twoParagraph',
+ st: 0,
+ ed: 15,
+ blockType: BlockType.PARAGRAPH,
+ paragraph: {
+ bullet: {
+ listId: 'testBullet',
+ nestingLevel: 1,
+ textStyle: {
+ fs: 20,
+ },
+ },
+ elements: {
+ oneElement: {
+ eId: 'oneElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '细化埋点上报链路和指标方案梳理',
+ },
+ },
+ twoElement: {
+ eId: 'twoElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '目前通过每日定时任务发送报告',
+ },
+ },
+ },
+ elementOrder: [
+ {
+ elementId: 'oneElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ {
+ elementId: 'twoElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ ],
+ },
+ },
+ threeParagraph: {
+ blockId: 'threeParagraph',
+ st: 0,
+ ed: 15,
+ blockType: BlockType.PARAGRAPH,
+ paragraph: {
+ bullet: {
+ listId: 'testBullet',
+ nestingLevel: 0,
+ textStyle: {
+ fs: 20,
+ },
+ },
+ elements: {
+ oneElement: {
+ eId: 'oneElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '自2018年首届进博会举办以来,进博会已经成为全球新品的首发地、前沿技术的首选地、创新服务的首推地。',
+ },
+ },
+ twoElement: {
+ eId: 'twoElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '中国这十年”对外开放成就展湖北展区主要以图文、图表、数据、视频、企业展品、实物模型、光电科技等体现湖北十年开放成就、重大开放平台及产业。湖北省共计17家企业、机构的展品将在这一展区展示',
+ },
+ },
+ },
+ elementOrder: [
+ {
+ elementId: 'oneElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ {
+ elementId: 'twoElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ ],
+ },
+ },
+ fourParagraph: {
+ blockId: 'fourParagraph',
+ st: 0,
+ ed: 15,
+ blockType: BlockType.PARAGRAPH,
+ paragraph: {
+ bullet: {
+ listId: 'testBullet',
+ nestingLevel: 1,
+ textStyle: {
+ fs: 20,
+ },
+ },
+ elements: {
+ oneElement: {
+ eId: 'oneElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '国家主席习近平以视频方式出席在上海举行的第五届中国国际进口博览会开幕式并发表题为《共创开放繁荣的美好未来》的致辞',
+ },
+ },
+ twoElement: {
+ eId: 'twoElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '中国将推动各国各方共享深化国际合作机遇,全面深入参与世界贸易组织改革谈判',
+ },
+ },
+ },
+ elementOrder: [
+ {
+ elementId: 'oneElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ {
+ elementId: 'twoElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ ],
+ },
+ },
+ fiveParagraph: {
+ blockId: 'fiveParagraph',
+ st: 0,
+ ed: 15,
+ blockType: BlockType.PARAGRAPH,
+ paragraph: {
+ bullet: {
+ listId: 'testBullet',
+ nestingLevel: 2,
+ textStyle: {
+ fs: 20,
+ },
+ },
+ elements: {
+ oneElement: {
+ eId: 'oneElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '中国男排两名现役国手彭世坤和张秉龙分别效力的三得利太阳鸟和东京大熊本轮遭遇。',
+ },
+ },
+ twoElement: {
+ eId: 'twoElement',
+ st: 0,
+ ed: 15,
+ et: ParagraphElementType.TEXT_RUN,
+ tr: {
+ ct: '双方经过激战,主场作战的卫冕冠军三得利技高一筹3-2逆转击败对手,力夺第3场胜利',
+ },
+ },
+ },
+ elementOrder: [
+ {
+ elementId: 'oneElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ {
+ elementId: 'twoElement',
+ paragraphElementType: ParagraphElementType.TEXT_RUN,
+ },
+ ],
+ },
+ },
+ },
+ blockElementOrder: ['oneParagraph', 'twoParagraph', 'threeParagraph', 'fourParagraph', 'fiveParagraph'],
+ },
+ documentStyle: {
+ pageSize: {
+ width: 594.3,
+ height: 840.51,
+ },
+ marginTop: 72,
+ marginBottom: 72,
+ marginRight: 90,
+ marginLeft: 90,
+ },
+};
diff --git a/packages/base-slides/src/SlidePlugin.tsx b/packages/base-slides/src/SlidePlugin.tsx
index 97e9a49fe8..77d571f5af 100644
--- a/packages/base-slides/src/SlidePlugin.tsx
+++ b/packages/base-slides/src/SlidePlugin.tsx
@@ -8,6 +8,7 @@ import { SlideContainerController } from './Controller/SlideContainerController'
import { InfoBarController } from './Controller/InfoBarController';
import { BaseSlideContainerConfig, ISlidePluginConfigBase, SlideContainer } from './View/UI/SlideContainer';
import { SlideBarController } from './Controller/SlideBarController';
+import { CanvasView } from './View/Render';
export interface ISlidePluginConfig extends ISlidePluginConfigBase {
container: HTMLElement | string;
@@ -39,6 +40,8 @@ export class SlidePlugin extends Plugin<SlidePluginObserve, SlideContext> {
private _canvasEngine: Engine;
+ private _canvasView: CanvasView;
+
private _toolBarControl: ToolBarController;
private _slideBarControl: SlideBarController;
@@ -155,6 +158,8 @@ export class SlidePlugin extends Plugin<SlidePluginObserve, SlideContext> {
this._canvasEngine = engineInstance;
engineInstance.setContainer(container);
+
+ this._canvasView = new CanvasView(engineInstance, this);
window.onresize = () => {
engineInstance.resize();
};
diff --git a/packages/base-slides/src/View/Render/BaseView.ts b/packages/base-slides/src/View/Render/BaseView.ts
new file mode 100644
index 0000000000..de3fd2eb34
--- /dev/null
+++ b/packages/base-slides/src/View/Render/BaseView.ts
@@ -0,0 +1,46 @@
+import { Scene } from '@univer/base-render';
+import { Registry, Worksheet } from '@univer/core';
+import { DocPlugin } from '../../DocPlugin';
+
+export class BaseView {
+ zIndex = 0;
+ viewKey = '';
+
+ private _scene: Scene;
+
+ private _plugin: DocPlugin;
+
+ // constructor(private _scene: Scene, private _plugin: Plugin) {
+ // this._initialize();
+ // }
+
+ getScene() {
+ return this._scene;
+ }
+
+ getPlugin() {
+ return this._plugin;
+ }
+
+ getContext() {
+ return this._plugin.getContext();
+ }
+
+ updateToSheet() {}
+
+ protected _initialize() {}
+
+ initialize(scene: Scene, plugin: DocPlugin) {
+ this._scene = scene;
+ this._plugin = plugin;
+ this._initialize();
+ return this;
+ }
+}
+
+export enum CANVAS_VIEW_KEY {
+ MAIN_SCENE = 'mainScene',
+ DOCS_VIEW = 'docsView',
+}
+
+export const CanvasViewRegistry = Registry.create();
diff --git a/packages/base-slides/src/View/Render/CanvasView.ts b/packages/base-slides/src/View/Render/CanvasView.ts
new file mode 100644
index 0000000000..6d54979181
--- /dev/null
+++ b/packages/base-slides/src/View/Render/CanvasView.ts
@@ -0,0 +1,91 @@
+import { Engine, EVENT_TYPE, IWheelEvent, Layer, Scene, ScrollBar, Viewport } from '@univer/base-render';
+import { EventState, sortRules } from '@univer/core';
+import { BaseView, CanvasViewRegistry, CANVAS_VIEW_KEY } from './BaseView';
+import { DocsView } from './Views/SlideView';
+import './Views';
+import { DocPlugin } from '../../DocPlugin';
+
+export class CanvasView {
+ private _scene: Scene;
+
+ private _views: BaseView[] = [];
+
+ constructor(private _engine: Engine, private _plugin: DocPlugin) {
+ this._initialize();
+ }
+
+ private _initialize() {
+ const engine = this._engine;
+ const context = this._plugin.getContext();
+
+ const scene = new Scene(CANVAS_VIEW_KEY.MAIN_SCENE, engine, {
+ width: 1200,
+ height: 2000,
+ });
+ this._scene = scene;
+ const viewMain = new Viewport(CANVAS_VIEW_KEY.DOCS_VIEW, scene, {
+ left: 0,
+ top: 0,
+ bottom: 0,
+ right: 0,
+ isWheelPreventDefaultX: true,
+ });
+
+ scene.addViewport(viewMain).attachControl();
+
+ scene.on(EVENT_TYPE.wheel, (evt: unknown, state: EventState) => {
+ const e = evt as IWheelEvent;
+ if (e.ctrlKey) {
+ const deltaFactor = Math.abs(e.deltaX);
+ let scrollNum = deltaFactor < 40 ? 0.2 : deltaFactor < 80 ? 0.4 : 0.2;
+ scrollNum *= e.deltaY > 0 ? -1 : 1;
+ if (scene.scaleX < 1) {
+ scrollNum /= 2;
+ }
+
+ if (scene.scaleX + scrollNum > 4) {
+ scene.scale(4, 4);
+ } else if (scene.scaleX + scrollNum < 0.1) {
+ scene.scale(0.1, 0.1);
+ } else {
+ const value = e.deltaY > 0 ? 0.1 : -0.1;
+ // scene.scaleBy(scrollNum, scrollNum);
+ e.preventDefault();
+ }
+ } else {
+ viewMain.onMouseWheel(e, state);
+ }
+ });
+
+ const scrollbar = new ScrollBar(viewMain);
+
+ scene.addLayer(Layer.create(scene, [], 0), Layer.create(scene, [], 2));
+
+ this._viewLoader(scene, this._plugin);
+
+ engine.runRenderLoop(() => {
+ scene.render();
+ document.getElementById('app')!.innerText = `fps:${Math.round(engine.getFps()).toString()}`;
+ });
+ }
+
+ getView(key: string) {
+ for (let view of this._views) {
+ if (view.viewKey === key) {
+ return view;
+ }
+ }
+ }
+
+ getDocsView(): DocsView {
+ return this.getView(CANVAS_VIEW_KEY.DOCS_VIEW) as DocsView;
+ }
+
+ private _viewLoader(scene: Scene, plugin: DocPlugin) {
+ CanvasViewRegistry.getData()
+ .sort(sortRules)
+ .forEach((view) => {
+ this._views.push(view.initialize(scene, plugin));
+ });
+ }
+}
diff --git a/packages/base-slides/src/View/Render/Views/PageView.ts b/packages/base-slides/src/View/Render/Views/PageView.ts
new file mode 100644
index 0000000000..29d2a694a1
--- /dev/null
+++ b/packages/base-slides/src/View/Render/Views/PageView.ts
@@ -0,0 +1,38 @@
+import { getColor, Rect, Documents, DocumentSkeleton, CustomObject, IPageRenderConfig, Transform, ptToPx } from '@univer/base-render';
+import { BaseView, CanvasViewRegistry } from '../BaseView';
+import { DOCS_VIEW_KEY } from './SlideView';
+
+const PAGE_VIEW_BACKGROUND = 'page_view_background';
+
+export class PageView extends BaseView {
+ zIndex = 2;
+
+ protected _initialize() {
+ const scene = this.getScene();
+ const context = this.getContext();
+
+ const documents = scene.getObject(DOCS_VIEW_KEY.MAIN) as Documents;
+
+ const pageSize = documents.getSkeleton()?.getPageSize();
+
+ documents.onPageRenderObservable.add((config: IPageRenderConfig) => {
+ const { page, pageLeft, pageTop, ctx } = config;
+ const { width, height, marginBottom, marginLeft, marginRight, marginTop } = page;
+ ctx.save();
+ ctx.translate(pageLeft - 0.5, pageTop - 0.5);
+ Rect.drawWith(ctx, {
+ width: pageSize?.width || width,
+ height: pageSize?.height || height,
+ strokeWidth: 1,
+ stroke: 'rgba(198,198,198, 1)',
+ fill: 'rgba(255,255,255, 1)',
+ zIndex: 3,
+ });
+ ctx.restore();
+ });
+
+ // scene.addObjects([pageBackground], 0);
+ }
+}
+
+CanvasViewRegistry.add(new PageView());
diff --git a/packages/base-slides/src/View/Render/Views/SlideView.ts b/packages/base-slides/src/View/Render/Views/SlideView.ts
new file mode 100644
index 0000000000..f18b521bbf
--- /dev/null
+++ b/packages/base-slides/src/View/Render/Views/SlideView.ts
@@ -0,0 +1,88 @@
+import { getColor, Rect, Documents, DocumentSkeleton } from '@univer/base-render';
+import { docsDemoData } from '../../../Basic/DemoData';
+import { BaseView, CanvasViewRegistry } from '../BaseView';
+import { CANVAS_VIEW_KEY } from '../BaseView';
+
+export enum DOCS_VIEW_KEY {
+ MAIN = '__DocsRender__',
+}
+
+export class DocsView extends BaseView {
+ zIndex = 1;
+
+ viewKey = CANVAS_VIEW_KEY.DOCS_VIEW;
+
+ private _documentSkeleton: DocumentSkeleton;
+
+ private _documents: Documents;
+
+ protected _initialize() {
+ const scene = this.getScene();
+ const context = this.getContext();
+
+ const documentSkeleton = this._buildSkeleton();
+
+ const documents = new Documents(DOCS_VIEW_KEY.MAIN, documentSkeleton);
+ documents.zIndex = 1000;
+ this._documentSkeleton = documentSkeleton;
+ this._documents = documents;
+
+ documentSkeleton.calculate();
+
+ scene.addObjects([documents], 0);
+
+ const engine = scene.getEngine();
+ if (engine) {
+ const { width: engineWidth, height: engineHeight } = engine;
+
+ const { width: docsWidth, height: docsHeight, pageMarginLeft, pageMarginTop } = documents;
+
+ let docsLeft = 0;
+ let docsTop = 0;
+
+ let sceneWidth = 0;
+
+ let sceneHeight = 0;
+
+ if (engineWidth > docsWidth) {
+ docsLeft = engineWidth / 2 - docsWidth / 2;
+ sceneWidth = engineWidth - 30;
+ } else {
+ docsLeft = pageMarginLeft;
+ sceneWidth = docsWidth + pageMarginLeft * 2;
+ }
+
+ if (engineHeight > docsHeight) {
+ docsTop = engineHeight / 2 - docsHeight / 2;
+ sceneHeight = engineHeight - 30;
+ } else {
+ docsTop = pageMarginTop;
+ sceneHeight = docsHeight + pageMarginTop * 2;
+ }
+
+ scene.resize(sceneWidth, sceneHeight);
+
+ documents.translate(docsLeft, docsTop);
+ }
+
+ documents.enableEditor();
+ }
+
+ getDocumentSkeleton() {
+ return this._documentSkeleton;
+ }
+
+ getDocs() {
+ return this._documents;
+ }
+
+ private _buildSkeleton() {
+ const context = this.getContext();
+
+ const docsSkeleton = DocumentSkeleton.create(docsDemoData, context);
+
+ return docsSkeleton;
+ }
+}
+
+CanvasViewRegistry.add(new DocsView());
diff --git a/packages/base-slides/src/View/Render/Views/index.ts b/packages/base-slides/src/View/Render/Views/index.ts
new file mode 100644
index 0000000000..4fbca55477
--- /dev/null
+++ b/packages/base-slides/src/View/Render/Views/index.ts
@@ -0,0 +1,2 @@
+export * from './SlideView';
+export * from './PageView';
diff --git a/packages/base-slides/src/View/Render/index.ts b/packages/base-slides/src/View/Render/index.ts
index e69de29bb2..e54650900a 100644
--- a/packages/base-slides/src/View/Render/index.ts
+++ b/packages/base-slides/src/View/Render/index.ts
@@ -0,0 +1,2 @@
+export * from './BaseView';
+export * from './CanvasView';