Skip to content

Commit

Permalink
refactor(): Layout Manager (#9152)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 authored Nov 30, 2023
1 parent 84924e4 commit 7c44efb
Show file tree
Hide file tree
Showing 33 changed files with 1,966 additions and 636 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## [next]

- fix(): transferring object between active selections, expose `FabricObject#parent`, rm `isActiveSelection` [#8951](https://github.com/fabricjs/fabric.js/pull/8951)
**BREAKING beta**:
- rm(): `getParent` => `FabricObject#parent`
- refactor(): Layout Manager [#9152](https://github.com/fabricjs/fabric.js/pull/9152)
- refactor(): transferring object between active selections, expose `FabricObject#parent`, rm `isActiveSelection` [#8951](https://github.com/fabricjs/fabric.js/pull/8951)
- refactor(): **BREAKING beta** `getParent` => `FabricObject#parent` [#8951](https://github.com/fabricjs/fabric.js/pull/8951)
- fix(): fire Poly control events [#9504](https://github.com/fabricjs/fabric.js/pull/9504)
- test(FabricObject): add a snapshot of the default values so that reordering and shuffling is verified. [#9492](https://github.com/fabricjs/fabric.js/pull/9492)
- feat(FabricObject, Canvas) BREAKING: remove calculate true/false from the api. [#9483](https://github.com/fabricjs/fabric.js/pull/9483)
Expand Down
5 changes: 1 addition & 4 deletions fabric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,11 @@ export type {
export type {
GroupEvents,
GroupProps,
LayoutContext,
GroupOwnProps,
LayoutContextType,
LayoutResult,
LayoutStrategy,
SerializedGroupProps,
} from './src/shapes/Group';
export { Group } from './src/shapes/Group';
export * from './src/LayoutManager';
export type {
ActiveSelectionOptions,
MultiSelectionStacking,
Expand Down
6 changes: 6 additions & 0 deletions src/EventTypeDefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import type { saveObjectTransform } from './util/misc/objectTransforms';
import type { Canvas } from './canvas/Canvas';
import type { IText } from './shapes/IText/IText';
import type { StaticCanvas } from './canvas/StaticCanvas';
import type {
LayoutBeforeEvent,
LayoutAfterEvent,
} from './LayoutManager/types';

export type ModifierKey = keyof Pick<
MouseEvent | PointerEvent | TouchEvent,
Expand Down Expand Up @@ -290,6 +294,8 @@ export interface StaticCanvasEvents extends CollectionEvents {
// rendering
'before:render': { ctx: CanvasRenderingContext2D };
'after:render': { ctx: CanvasRenderingContext2D };
'object:layout:before': LayoutBeforeEvent & { target: Group };
'object:layout:after': LayoutAfterEvent & { target: Group };
}

export interface CanvasEvents
Expand Down
Loading

0 comments on commit 7c44efb

Please sign in to comment.