Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(TS): object mixins #8414

Merged
merged 63 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
0bb65f9
init
ShaMan123 Oct 31, 2022
39aa829
Update object_ancestry.mixin.ts
ShaMan123 Oct 31, 2022
c4f72d3
apply mixins
ShaMan123 Oct 31, 2022
0333f38
mixins
ShaMan123 Oct 31, 2022
4a87ccc
split
ShaMan123 Oct 31, 2022
a1db53e
Squashed commit of the following:
ShaMan123 Oct 31, 2022
1e6c012
s
ShaMan123 Oct 31, 2022
b83df40
r
ShaMan123 Oct 31, 2022
d252e36
imports
ShaMan123 Oct 31, 2022
eebf759
Revert "Squashed commit of the following:"
ShaMan123 Oct 31, 2022
0cf73bf
Merge branch 'master' into ts-object-mixins
ShaMan123 Oct 31, 2022
9b16b18
Update CHANGELOG.md
ShaMan123 Oct 31, 2022
1985962
svg mix
ShaMan123 Oct 31, 2022
50f14da
rename
ShaMan123 Oct 31, 2022
f0e24f2
Update object_stacking.mixin.ts
ShaMan123 Oct 31, 2022
0530d84
Merge branch 'master' into ts-object-mixins
ShaMan123 Oct 31, 2022
537d056
split
ShaMan123 Oct 31, 2022
a01a55d
Update fabricObject.class.ts
ShaMan123 Oct 31, 2022
c03ba7c
Update fabricObject.class.ts
ShaMan123 Oct 31, 2022
d23c73c
Update object.svg_export.ts
ShaMan123 Oct 31, 2022
1ccd7a5
Update object.svg_export.ts
ShaMan123 Oct 31, 2022
fc1b615
Update object_animation.mixin.ts
ShaMan123 Oct 31, 2022
7ef6efa
Update object_animation.mixin.ts
ShaMan123 Oct 31, 2022
3ab5f74
revert
ShaMan123 Oct 31, 2022
2622152
type
ShaMan123 Nov 1, 2022
038e3e1
better types
ShaMan123 Nov 1, 2022
4c0c130
Update object_ancestry.mixin.ts
ShaMan123 Nov 1, 2022
3803c07
naming
ShaMan123 Nov 1, 2022
0252600
Merge branch 'master' into ts-object-mixins
ShaMan123 Nov 21, 2022
c64bcd0
fix proto chain
ShaMan123 Nov 23, 2022
7c5026a
Merge branch 'master' into ts-object-mixins
ShaMan123 Nov 27, 2022
cb83bc1
Update __types__.ts
ShaMan123 Nov 27, 2022
ddf366c
Update object_straightening.mixin.ts
ShaMan123 Nov 27, 2022
8053944
imports
ShaMan123 Nov 27, 2022
c6a9d56
Update fabricObject.class.ts
ShaMan123 Nov 27, 2022
9bb922a
types
ShaMan123 Nov 27, 2022
8fd4b80
Update fabricObject.class.ts
ShaMan123 Nov 27, 2022
ac5fdf4
types
ShaMan123 Nov 27, 2022
05f8a32
TS/es6
ShaMan123 Nov 27, 2022
184e360
Canvas type
ShaMan123 Nov 27, 2022
ef6c29d
Update fabricObject.class.ts
ShaMan123 Nov 27, 2022
a972e95
Update applyMixins.ts
ShaMan123 Nov 27, 2022
d178930
try fix non applied mixin
ShaMan123 Nov 27, 2022
39c056b
Update index.js
ShaMan123 Nov 27, 2022
e110457
fix imports
ShaMan123 Nov 27, 2022
c8dc7fe
Update object.js
ShaMan123 Nov 27, 2022
3f4e2a8
fix import
ShaMan123 Nov 27, 2022
c80efe1
BREAKING: rm object stacking methods
ShaMan123 Nov 27, 2022
efe92f7
merge straightening into animation mixin
ShaMan123 Nov 27, 2022
cc075ca
rename
ShaMan123 Nov 27, 2022
90b0dc5
Update index.js
ShaMan123 Nov 27, 2022
a031d4c
Update object_animation.mixin.ts
ShaMan123 Nov 27, 2022
4ce9226
Update object.class.ts
ShaMan123 Nov 27, 2022
e03cfed
a bit of cleanup
ShaMan123 Nov 27, 2022
52cf10c
checkout
ShaMan123 Nov 27, 2022
42c826e
Update object_animation.mixin.ts
ShaMan123 Nov 27, 2022
7b93359
Update fabricObject.class.ts
ShaMan123 Nov 27, 2022
8af3477
revert
ShaMan123 Nov 27, 2022
02c360d
Update fabricObject.class.ts
ShaMan123 Nov 27, 2022
d7433c1
Update object_stacking.mixin.ts
ShaMan123 Nov 27, 2022
27157bc
Update object_animation.mixin.ts
ShaMan123 Nov 27, 2022
e6ef7a1
Update object_animation.mixin.ts
ShaMan123 Nov 27, 2022
7eebd70
Merge branch 'master' into ts-object-mixins
asturur Nov 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [next]

- chore(TS): migrate object mixins to TS [#8414](https://github.com/fabricjs/fabric.js/pull/8414)
- chore(TS): BaseBrush abstract methods [#8428](https://github.com/fabricjs/fabric.js/pull/8428)
- feat(): Add `createObjectDefaultControls` and `createTextboxDefaultControls` to create copies of control sets. [#8415](https://github.com/fabricjs/fabric.js/pull/8415)
- fix(PatternBrush): `getPatternSrc`, rm `getPatternSrcFunction` [#8468](https://github.com/fabricjs/fabric.js/pull/8468)
Expand Down
16 changes: 7 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ import './src/canvas.class'; // optional interaction
import './src/mixins/canvas_events.mixin'; // optional interaction
import './src/mixins/canvas_grouping.mixin'; // optional interaction
import './src/mixins/canvas_dataurl_exporter.mixin';
import './src/mixins/canvas_serialization.mixin'; // optiona serialization
import './src/mixins/canvas_gestures.mixin'; // optional gesturesv
import './src/mixins/object_interactivity.mixin'; // optional interaction
import './src/mixins/object_ancestry.mixin';
import './src/mixins/object_stacking.mixin';
import './src/mixins/object.svg_export';
import './src/mixins/stateful.mixin';
import './src/mixins/animation.mixin'; // optional animation
import './src/mixins/canvas_serialization.mixin'; // optional serialization
import './src/mixins/canvas_gestures.mixin'; // optional gestures
import './src/mixins/canvas_animation.mixin'; // optional animation
import './src/mixins/canvas_straightening.mixin'; // optional animation
import './src/shapes/fabricObject.class';
import './src/mixins/object_stacking.mixin'; // removed in #8461
ShaMan123 marked this conversation as resolved.
Show resolved Hide resolved
import './src/mixins/stateful.mixin'; // will die soon
import './src/shapes/line.class';
import './src/shapes/circle.class';
import './src/shapes/triangle.class';
Expand All @@ -34,7 +33,6 @@ import './src/shapes/path.class';
import './src/shapes/group.class';
import './src/shapes/active_selection.class'; // optional interaction
import './src/shapes/image.class';
import './src/mixins/object_straightening.mixin'; // optional objectstraightening
import './src/filters/WebGLProbe'; // optional image_filters
import './src/filters/base_filter.class'; // optional image_filters
import './src/filters/colormatrix_filter.class'; // optional image_filters
Expand Down
9 changes: 6 additions & 3 deletions src/__types__.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CanvasEvents, ModifierKey } from './EventTypeDefs';
import { CanvasEvents, ModifierKey, StaticCanvasEvents } from './EventTypeDefs';
import type { Observable } from './mixins/observable.mixin';
import type { Point } from './point.class';
import type { FabricObject } from './shapes/fabricObject.class';
import { TMat2D } from './typedefs';

/**
Expand All @@ -10,7 +11,8 @@ export type Canvas = StaticCanvas & {
altActionKey: ModifierKey;
uniScaleKey: ModifierKey;
uniformScaling: boolean;
} & Record<string, any>;
} & Record<string, any> &
Observable<CanvasEvents>;
export type StaticCanvas = Record<string, any> & {
getZoom(): number;
viewportTransform: TMat2D;
Expand All @@ -19,4 +21,5 @@ export type StaticCanvas = Record<string, any> & {
br: Point;
};
getRetinaScaling(): number;
} & Observable<CanvasEvents>;
_objects: FabricObject[];
} & Observable<StaticCanvasEvents>;
258 changes: 0 additions & 258 deletions src/mixins/animation.mixin.ts

This file was deleted.

Loading