mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Add tooltips to input holes in flyout.
This commit is contained in:
parent
c21d4bab79
commit
b5a2f75cee
1 changed files with 2 additions and 0 deletions
|
@ -426,6 +426,8 @@ Blockly.Flyout.prototype.show = function(xmlList) {
|
|||
// Create an invisible rectangle under the block to act as a button. Just
|
||||
// using the block as a button is poor, since blocks have holes in them.
|
||||
var rect = Blockly.createSvgElement('rect', {'fill-opacity': 0}, null);
|
||||
rect.tooltip = block;
|
||||
Blockly.Tooltip.bindMouseEvents(rect);
|
||||
// Add the rectangles under the blocks, so that the blocks' tooltips work.
|
||||
this.workspace_.getCanvas().insertBefore(rect, block.getSvgRoot());
|
||||
block.flyoutRect_ = rect;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue