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

fix(): #9009 artifacts #9022

Merged
merged 7 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .codesandbox/templates/vanilla/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fabric from 'fabric';
import './styles.css';

const el = document.getElementById('canvas');
const canvas = new fabric.Canvas(el);
const canvas = (window.canvas = new fabric.Canvas(el));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for ease of dev


// edit from here
canvas.setDimensions({
Expand Down
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]

- fix(): tweaks to type getter [#9022](https://github.com/fabricjs/fabric.js/pull/9022)
- ci() Refactor GHA actions for caching and reuse [#9029](https://github.com/fabricjs/fabric.js/pull/9029)
- ci(): install dev deps types [#9039](https://github.com/fabricjs/fabric.js/pull/9039)

Expand Down
4 changes: 0 additions & 4 deletions src/filters/ColorMatrixFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { classRegistry } from '../ClassRegistry';

export function createColorMatrixFilter(key: string, matrix: number[]) {
const newClass = class extends ColorMatrix {
get type() {
return key;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this still works because of BaseFilter, this we can remove


static type = key;

static defaults = {
Expand Down
4 changes: 3 additions & 1 deletion src/shapes/IText/IText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ export class IText<
static type = 'IText';

get type() {
return 'i-text';
const type = super.type;
// backward compatibility
return type === 'itext' ? 'i-text' : type;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should stay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is breaks subclassing
Textbox is broken

Copy link
Contributor Author

@ShaMan123 ShaMan123 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should instead override isType like you did with object

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed like you did with object


/**
Expand Down