Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(sheet): refactor the loading current sheet #235

Merged
merged 4 commits into from
Oct 6, 2023

Conversation

DR-Univer
Copy link
Collaborator

No description provided.

@DR-Univer DR-Univer merged commit 3752e24 into dev Oct 6, 2023
3 checks passed
@DR-Univer DR-Univer deleted the refactor-base-doc-first branch October 6, 2023 11:52
packages/base-docs/src/View/CanvasView.ts Show resolved Hide resolved
* should start renderLoop Immediately
* default is true
*/
shouldRenderLoopImmediately?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldStartRenderingImmediately

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个英文水平 很可以 ~~

return null;
}

if (this._canvasEle && this._canvasEle.ownerDocument && this._canvasEle.ownerDocument.defaultView) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用 optional chaining 语法提高可读性

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -103,6 +89,26 @@ export class Documents extends DocComponent {
return new Documents(oKey, documentSkeleton, config);
}

setConfig(config?: IDocumentsConfig) {
if (config?.pageMarginLeft === undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里用对象展开操作符合并默认值就行,不用写这么多 if else

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前直接搬过来的,改造的时候 我再处理下

@@ -289,3 +289,5 @@ export enum RENDER_CLASS_TYPE {
LAYER = 'Layer',
GROUP = 'Group',
}

export const DOCS_EDITOR_UNIT_ID_KEY = '__defaultDocumentEditorSpecialUnitId_20231006__';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

咋还有个日期 🍭

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

咱们今天得出的结论哈哈,保持这个editor的绝对唯一性 哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants