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:
parent
33465b9c49
commit
c937b01915
2 changed files with 0 additions and 12 deletions
|
@ -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;
|
||||
|
|
|
@ -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!
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue