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

Remove reference to lastRenderedWithControls when that object is deleted #3023

Merged
merged 1 commit into from Jun 2, 2016
Merged

Remove reference to lastRenderedWithControls when that object is deleted #3023

merged 1 commit into from Jun 2, 2016

Conversation

ghost
Copy link

@ghost ghost commented Jun 1, 2016

This fixes an issue where a user could remove a textbox from the canvas, and then click in the space where the textbox was, and it would re-appear.

if (obj === this.lastRenderedWithControls) {
delete this.lastRenderedWithControls;
}
this.callSuper('_onObjectRemoved', obj);
Copy link
Member

Choose a reason for hiding this comment

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

would it not fit in StaticCanvas more than Canvas? StaticCanvas does not have interactivity layer but still can render controls.
Other than that it look goods to me.

Copy link
Author

Choose a reason for hiding this comment

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

this.lastRenderedWithControls is defined in the canvas.class.js. Should I move all uses of the flag to StaticCanvas?

Copy link
Member

Choose a reason for hiding this comment

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

no you are right, it does not belong in StaticCanvas. is it fine like it is.

@asturur asturur merged commit da42b29 into fabricjs:master Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant