-
Notifications
You must be signed in to change notification settings - Fork 0
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
Table cells are not removed from view when removing the table #22
Comments
This seems like it may require changes in replaceChildren. Possible fix is to add a check to see if the element is a Table and if so call table.removeAllRowsWithContent(). |
replaceChildren() is designed so you can respond to it without modifying the function. replaceChildren() calls modelChanged() and passes in either ModelChange.ELEMENT_ADDED or ModelChange.ELEMENT_REMOVAL. modelChanged() is designed to be overridden by the subclasses to handle any additional class-specific cleanup necessary. |
I'll check into it. In my tests it seems the modelChanged() is getting called when TableCellElements are added but not when the Table is removed. |
That makes sense. The function is called on the parent of the elements that are added/removed. |
We may want to add an override so that the element itself has a chance to clean up. Maybe, element.removed() or element.modelChanged(ModelChange.REMOVED). |
With the last update the shapes are now removed when the text flow is cleared but when the table element is removed by removeChild() an error is thrown. ArgumentError: Child to remove not found |
The cells are not removed from view when removing the table.
Steps to Reproduce
Expected Results
Table is removed from text flow and no longer visible
Actual Results
Table is removed from the text flow object but the visual elements are still visible
The text was updated successfully, but these errors were encountered: