-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 a bunch more Closure #2552
Conversation
Current count: 638
TODO: There are more functions which may be migrated into dom and string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after a few ordering nits.
Search and replace for userAgent didn’t take into account alphabetic ordering. Also some line wraping.
Old: a box object with two coordinate objects, each with two numbers. New: a box object with four numbers. The old system would make sense if there was a reason to group the top-left and bottom-right coordinates. But in our code we only pulled out top/bottom/left/right numbers. New code is simpler and faster.
Search and replace of a name strikes again.
Previously it returned x,y,width,height. Returning top,bottom,left,right results in simpler code, both in this function and in downstream callers. This commit makes the minumum change to the metrics_test. I’m happy to change the test’s data if that makes more sense.
Also move SVG_NS and HTML_NS properties.
And fix provide/require mixup.
Instead of top/left/height/width. Given our uses of Rect, it makes the math slightly simpler. This is a setup for using Rect in other places. Currently it is only used to describe delete areas.
Here's a summary of the rectangle changes that span across four commits. Previously we were using three different types of data structures to describe rectangles:
As a result of these commits, we are now using only option 1. This means that Blockly.utils.Rect is used in more places. |
Note: provides were fixed in the following commit. LGTM |
By the way based on my conversation with Amber, I think moving svg utils into utils.dom may break a not insignificant amount of people. |
Each commit may be viewed individually.