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

iText - cusor animate should fire after:render #2850

Closed
inssein opened this issue Mar 22, 2016 · 2 comments
Closed

iText - cusor animate should fire after:render #2850

inssein opened this issue Mar 22, 2016 · 2 comments
Labels
Milestone

Comments

@inssein
Copy link
Contributor

inssein commented Mar 22, 2016

I have written a few plugins that perform actions on the upper canvas after the canvas is done rendering, but it is all erased when editing text.

This is because the cursor animation clears the entire selection context. Would it be appropriate to obj.canvas.fire('after:render'); after https://github.com/kangax/fabric.js/blob/master/src/mixins/itext_behavior.mixin.js#L117? If so, I could submit a PR.

@asturur
Copy link
Member

asturur commented Mar 26, 2016

Hello @inssein
About this i'm not entirely shure, "after:render" we fire after renderAll() while we offloaded the cursor rendering to the top canvas.
I think that firing this event after the cursor animation would be confusing.
I would be more for another event, even a new one.

i would be more appriopriate to fire something like "topCanvas:beforeRender" and "topCanvas:afterRender".

Or we could even stop clearing ALL the top context for just the cursor animation, i remember someone was already complaining about that.

@asturur
Copy link
Member

asturur commented Apr 30, 2016

I don't really know here, cursor animation is fast, it can be up to 60 fps.
I don't think firing events there is good.
Maybe more clearing the small rect where the cursor is flashing and nothing else.
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants