File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[
2+ {
3+ "version" : 2 ,
4+ "id" : " snap-to-grid" ,
5+ "versionAdded" : " v4.0.0"
6+ },
27 {
38 "version" : 2 ,
49 "id" : " select-self" ,
Original file line number Diff line number Diff line change 1+ {
2+ "title" : " Snap Scripts to Grid" ,
3+ "description" : " Automatically aligns scripts to the dotted grid in the editor when placed." ,
4+ "credits" : [
5+ {
6+ "username" : " rgantzos" ,
7+ "url" : " https://scratch.mit.edu/users/rgantzos/"
8+ }
9+ ],
10+ "type" : [
11+ " Editor"
12+ ],
13+ "tags" : [
14+ " New"
15+ ],
16+ "scripts" : [
17+ {
18+ "file" : " script.js" ,
19+ "runOn" : " /projects/*"
20+ }
21+ ]
22+ }
Original file line number Diff line number Diff line change 1+ export default async function ( { feature, console } ) {
2+ await ScratchTools . waitForElement ( "div.gui" )
3+ update ( )
4+
5+ feature . traps . vm . on ( "workspaceUpdate" , function ( ) {
6+ update ( )
7+ } )
8+
9+ function update ( ) {
10+ Blockly . getMainWorkspace ( ) . grid_ . snapToGrid_ = feature . self . enabled
11+ }
12+ }
You can’t perform that action at this time.
0 commit comments