remove ShapeUtil.point (#1591)

Removes the unused `ShapeUtil.point`.

### Change Type

- [x] `major` — Breaking change

### Release Notes

- [editor] Remove `ShapeUtil.point`
This commit is contained in:
Steve Ruiz 2023-06-15 12:53:09 +01:00 committed by GitHub
parent 33465b9c49
commit c937b01915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 12 deletions

View file

@ -1894,7 +1894,6 @@ export abstract class ShapeUtil<T extends TLUnknownShape = TLUnknownShape> {
onTranslateEnd?: TLOnTranslateEndHandler<T>;
onTranslateStart?: TLOnTranslateStartHandler<T>;
outline(shape: T): Vec2dModel[];
point(shape: T): Vec2dModel;
// @internal
providesBackgroundForChildren(shape: T): boolean;
abstract render(shape: T): any;

View file

@ -8,7 +8,6 @@ import type { Editor } from '../Editor'
import { TLResizeHandle } from '../types/selection-types'
import { TLExportColors } from './shared/TLExportColors'
const points = new WeakMapCache<TLShape, Vec2dModel>()
const transforms = new WeakMapCache<TLShape, Matrix2d>()
/** @public */
@ -234,16 +233,6 @@ export abstract class ShapeUtil<T extends TLUnknownShape = TLUnknownShape> {
)
}
/**
* Get the cached point. Do not override this method!
*
* @param shape - The shape.
* @public
*/
point(shape: T): Vec2dModel {
return points.get<T>(shape, (shape) => ({ x: shape.x, y: shape.y }))
}
/**
* Get the shape's (not cached) outline. Do not override this method!
*