utils.svgMath 命名空间
函数
功能 | 说明 |
---|---|
getDocumentScroll() | 以坐标对象的形式获取文档滚动距离。从 Closure 的 goog.dom.getDocumentScroll 中复制。 |
getInjectionDivXY(元素) | 返回该元素的左上角相对于注入 Blockly 的 div 的坐标。 |
getRelativeXY(元素) | 返回该元素左上角相对于其父元素的坐标。仅适用于 SVG 元素和子项(例如 rect、g、path)。 |
screenToWsCoordinates(ws, screenCoordinates) | 将屏幕坐标转换为工作区坐标。 |
wsToScreenCoordinates(ws, workspaceCoordinates) | 将工作区坐标转换为屏幕坐标。 |
变量
变量 | 说明 |
---|---|
TEST_ONLY |