-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(): #9009 artifacts #9022
Conversation
Build Stats
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes textbox.type
and removes future bug potential with the filters.
mmmmm |
The bug is textbox.type==='i-text' |
in fabric6 instances need to have a type property that return the fabric 5 style type. |
@@ -3,10 +3,6 @@ import { classRegistry } from '../ClassRegistry'; | |||
|
|||
export function createColorMatrixFilter(key: string, matrix: number[]) { | |||
const newClass = class extends ColorMatrix { | |||
get type() { | |||
return key; | |||
} |
There was a problem hiding this comment.
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
@@ -204,10 +204,6 @@ export class IText< | |||
|
|||
static type = 'IText'; | |||
|
|||
get type() { | |||
return 'i-text'; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should stay.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ready and satisfies all requirements
@@ -204,10 +204,6 @@ export class IText< | |||
|
|||
static type = 'IText'; | |||
|
|||
get type() { | |||
return 'i-text'; | |||
} |
There was a problem hiding this comment.
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
@@ -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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ease of dev
Motivation
Originally posted by @ShaMan123 in #9009 (comment)
Description
I did not imagine that would happen so fast.
Changes
Gist
In Action