Skip to content

Commit

Permalink
chore: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
doouding committed Sep 24, 2024
1 parent 7cf14b1 commit a667dd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/framework/block-std/src/gfx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export {
type SurfaceBlockProps,
type SurfaceMiddleware,
} from './surface/surface-model.js';
export * from './viewport.js';
export { BaseTool } from './tool/tool.js';

export { ToolController } from './tool/tool-controller.js';
export * from './viewport.js';
export { GfxViewportElement } from './viewport-element.js';
export { generateKeyBetween, generateNKeysBetween } from 'fractional-indexing';
6 changes: 3 additions & 3 deletions packages/framework/block-std/src/gfx/tool/tool-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Signal } from '@preact/signals-core';

import type { UIEventStateContext } from '../../event/index.js';
import type { BlockStdScope } from '../../scope/block-std-scope.js';
import type { AbstractTool } from './tool.js';
import type { BaseTool } from './tool.js';

const supportedEvents = [
'dragStart',
Expand Down Expand Up @@ -39,7 +39,7 @@ export class ToolController {

private readonly _toolName$ = new Signal<string>('');

private _tools = new Map<string, AbstractTool>();
private _tools = new Map<string, BaseTool>();

readonly dragging$ = new Signal<boolean>(false);

Expand Down Expand Up @@ -146,7 +146,7 @@ export class ToolController {
});
}

register(toolCtors: Constructor<AbstractTool>[]) {
register(toolCtors: Constructor<BaseTool>[]) {
toolCtors.forEach(ctor => {
const tool = new ctor(this);

Expand Down
2 changes: 1 addition & 1 deletion packages/framework/block-std/src/gfx/tool/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type ToolController,
} from './tool-controller.js';

export abstract class AbstractTool {
export abstract class BaseTool {
abstract readonly name: string;

get active() {
Expand Down

0 comments on commit a667dd4

Please sign in to comment.