Select block programmatically?

226 views
Skip to first unread message

Marc Levin

unread,
Jul 12, 2018, 9:36:53 AM7/12/18
to Blockly
I want to programmatically select a block so that it gets the yellow surround that it would if the user manually clicked on it.

I can't find anything in the API though that looks like it would do the trick. 

Is this possible to do?

Andrew n marshall

unread,
Jul 12, 2018, 1:11:22 PM7/12/18
to blo...@googlegroups.com
You're looking for the BlockSvg.select() method.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marc Levin

unread,
Jul 12, 2018, 2:04:52 PM7/12/18
to Blockly
Ah that's perfect, thank you.

I was combing the Block and Workspace API pages, never thought to look at BlockSvg.

Thanks!


On Thursday, 12 July 2018 18:11:22 UTC+1, Andrew n marshall wrote:
You're looking for the BlockSvg.select() method.
On Thu, Jul 12, 2018 at 6:36 AM, Marc Levin <marc...@gmail.com> wrote:
I want to programmatically select a block so that it gets the yellow surround that it would if the user manually clicked on it.

I can't find anything in the API though that looks like it would do the trick. 

Is this possible to do?

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages