From d6096accca8d627856c0fbae4a9a0c72c03a80b1 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 28 Mar 2019 14:20:19 -0700 Subject: [PATCH] Remove Blockly.WidgetDiv.position Nobody appears to call it. --- core/widgetdiv.js | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/core/widgetdiv.js b/core/widgetdiv.js index 258080978..9fc80d82f 100644 --- a/core/widgetdiv.js +++ b/core/widgetdiv.js @@ -122,35 +122,6 @@ Blockly.WidgetDiv.hideIfOwner = function(oldOwner) { } }; -/** - * Position the widget at a given location. Prevent the widget from going - * offscreen top or left (right in RTL). - * @param {number} anchorX Horizontal location (window coordinates, not body). - * @param {number} anchorY Vertical location (window coordinates, not body). - * @param {!goog.math.Size} windowSize Height/width of window. - * @param {!goog.math.Coordinate} scrollOffset X/y of window scrollbars. - * @param {boolean} rtl True if RTL, false if LTR. - */ -Blockly.WidgetDiv.position = function(anchorX, anchorY, windowSize, - scrollOffset, rtl) { - // Don't let the widget go above the top edge of the window. - if (anchorY < scrollOffset.y) { - anchorY = scrollOffset.y; - } - if (rtl) { - // Don't let the widget go right of the right edge of the window. - if (anchorX > windowSize.width + scrollOffset.x) { - anchorX = windowSize.width + scrollOffset.x; - } - } else { - // Don't let the widget go left of the left edge of the window. - if (anchorX < scrollOffset.x) { - anchorX = scrollOffset.x; - } - } - Blockly.WidgetDiv.positionInternal_(anchorX, anchorY, windowSize.height); -}; - /** * Set the widget div's position and height. This function does nothing clever: * it will not ensure that your widget div ends up in the visible window.