[Docs] Change some internal methods to public (#1554)
This PR changes some Editor methods from internal to public, so that they appear on the docs site. Closes #1545 ### Change Type - [x] `documentation` — Changes to the documentation only (will not publish a new version) ### Release Notes - [docs] Changed some Editor methods from internal to public.
This commit is contained in:
parent
21cefc77f5
commit
b86c751b03
2 changed files with 6 additions and 6 deletions
|
@ -723,7 +723,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
// @internal (undocumented)
|
// @internal (undocumented)
|
||||||
setProjectName(name: string): void;
|
setProjectName(name: string): void;
|
||||||
setProp(key: TLShapeProp, value: any, ephemeral?: boolean, squashing?: boolean): this;
|
setProp(key: TLShapeProp, value: any, ephemeral?: boolean, squashing?: boolean): this;
|
||||||
// @internal (undocumented)
|
// (undocumented)
|
||||||
setReadOnly(isReadOnly: boolean): this;
|
setReadOnly(isReadOnly: boolean): this;
|
||||||
setScribble(scribble?: null | TLScribble): this;
|
setScribble(scribble?: null | TLScribble): this;
|
||||||
setSelectedIds(ids: TLShapeId[], squashing?: boolean): this;
|
setSelectedIds(ids: TLShapeId[], squashing?: boolean): this;
|
||||||
|
@ -763,13 +763,13 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
updateAssets(assets: TLAssetPartial[]): this;
|
updateAssets(assets: TLAssetPartial[]): this;
|
||||||
// @internal
|
// @internal
|
||||||
updateCullingBounds(): this;
|
updateCullingBounds(): this;
|
||||||
// @internal (undocumented)
|
// (undocumented)
|
||||||
updateDocumentSettings(settings: Partial<TLDocument>): void;
|
updateDocumentSettings(settings: Partial<TLDocument>): void;
|
||||||
updateInstanceState(partial: Partial<Omit<TLInstance, 'currentPageId'>>, ephemeral?: boolean, squashing?: boolean): this;
|
updateInstanceState(partial: Partial<Omit<TLInstance, 'currentPageId'>>, ephemeral?: boolean, squashing?: boolean): this;
|
||||||
updatePage(partial: RequiredKeys<TLPage, 'id'>, squashing?: boolean): this;
|
updatePage(partial: RequiredKeys<TLPage, 'id'>, squashing?: boolean): this;
|
||||||
updateShapes(partials: (null | TLShapePartial | undefined)[], squashing?: boolean): this;
|
updateShapes(partials: (null | TLShapePartial | undefined)[], squashing?: boolean): this;
|
||||||
updateViewportScreenBounds(center?: boolean): this;
|
updateViewportScreenBounds(center?: boolean): this;
|
||||||
// @internal (undocumented)
|
// (undocumented)
|
||||||
readonly user: UserPreferencesManager;
|
readonly user: UserPreferencesManager;
|
||||||
get viewportPageBounds(): Box2d;
|
get viewportPageBounds(): Box2d;
|
||||||
get viewportPageCenter(): Vec2d;
|
get viewportPageCenter(): Vec2d;
|
||||||
|
|
|
@ -377,7 +377,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
readonly snaps = new SnapManager(this)
|
readonly snaps = new SnapManager(this)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @public
|
||||||
*/
|
*/
|
||||||
readonly user: UserPreferencesManager
|
readonly user: UserPreferencesManager
|
||||||
|
|
||||||
|
@ -1513,7 +1513,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
return this.store.get(TLDOCUMENT_ID)!
|
return this.store.get(TLDOCUMENT_ID)!
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @public */
|
||||||
updateDocumentSettings(settings: Partial<TLDocument>) {
|
updateDocumentSettings(settings: Partial<TLDocument>) {
|
||||||
this.store.put([{ ...this.documentSettings, ...settings }])
|
this.store.put([{ ...this.documentSettings, ...settings }])
|
||||||
}
|
}
|
||||||
|
@ -1600,7 +1600,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
|
|
||||||
private _isReadOnly = atom<boolean>('isReadOnly', false as any)
|
private _isReadOnly = atom<boolean>('isReadOnly', false as any)
|
||||||
|
|
||||||
/** @internal */
|
/** @public */
|
||||||
setReadOnly(isReadOnly: boolean): this {
|
setReadOnly(isReadOnly: boolean): this {
|
||||||
this._isReadOnly.set(isReadOnly)
|
this._isReadOnly.set(isReadOnly)
|
||||||
if (isReadOnly) {
|
if (isReadOnly) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue