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
AngularJS #553
Comments
The events were passing through fine, I just needed to call |
@raichu can you please provide and example of where you put |
I call it whenever the UI needs to be updated (canvas events for example). By the way, to avoid unnecessary updates, you can use
|
I wanted to call it on canvas events also, but I encountered another problem even before that. my fabric.Canvas is inited on window.onload event, but angularjs is inited beforehand - thus when trying to use canvas inside a controller I get |
How about... by not doing that? |
@MeLight ... I'm going to be facing a very similar use case to what you are trying to accomplish here. Did you ever figure it out? |
@loganpowell hi logan. I kinda brute forced it. I created the canvas element in window.onload, and simply checked if it's defined in every angular function I use it. |
|
I wish i could help you but i really do not know angular. I mean you do not need a directive for canvas for use fabricjs. once the element is ready on the dom just initialize the library. |
I know we can use Fabric.js in Angular but I am just trying to see if there is a more elegant way to do so. Plugging some non-angular code into an Angular project might not be something can be easily maintained by someone else. But still, thanks for your feedback! |
check the kitchensink deno, is built with angular. |
Can you provide a link for that? Thanks. @asturur |
Still facing this issue of not being able to access class's properties inside canvas.on event listener |
@keetstream the i m not sure if your issue relates to the original question, if it does, is probably a matter of mastering angularJS initialization |
hi asturur, I believe so, I got it working though, weirdly enough |
Is it possible to use fabric.js with AngularJS?
I gave it a try, but apparently none of the functions I gave to
canvas.on.()
got run.Is AngularJS eating up all events?
I wonder if there's a way of getting fabric.js work with AngularJS.
The text was updated successfully, but these errors were encountered: