Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editor: be more mindful of sending dirt recursively when n-slicing
A long time ago, I only sent out dirt.nslicer when anything about the vector n-slicer changed. However, this caused clipping paths inside of a vector n-slicer to not update in time. I was worried to miss a spot, so in addition to sending dirt.nslicer, I also sent out dirt.path.. recursively... Then it turns out that if there are texts inside of the n-sliced node, they will also listen to dirt.path, and that caused some performance issues. So now we are back to wanting to send dirt.nslicer, and have places that listen to it calculate things. The way I audited this... I first did a search for all ComponentDirt.path in the Dart codebase:  Then for all of them, I see whether the check occurred in a update() function. If it does, then I added an dirt.nslicer condition too. This was after the first commit. I'm hoping that doing it this way means that the checks are complete, meaning I'm not missing any dirt.nslicer checks. I then commented each out, and see whether something will not update in time. So e.g. if the update is on a layout node, I'd check whether a hug layout node responds to an nsliced node's width/height. (in this case, I don't need the nslicer check, so i removed it). This was the second commit. I'm hoping that doing it this way means all the dirt.nslicer checks are necessary. Then the idea is...if we are doing sth complete and necessary, it's the right amount. Diffs= 1d23ae5782 editor: be more mindful of sending dirt recursively when n-slicing (#8576)
- Loading branch information