nodeskini 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklySkini/archive/blocklyControleur.js +87 -0
- package/blocklySkini/archive/blocklySkini.js +84 -0
- package/blocklySkini/archive/blocklyhop.js +75 -0
- package/blocklySkini/archive/clientControleurBlocly.js +170 -0
- package/blocklySkini/archive/index.html +76 -0
- package/blocklySkini/archive/testHHsuspend.txt +89 -0
- package/blocklySkini/archive/testHHtrap.txt +262 -0
- package/blocklySkini/archive/testOrchestration.txt +177 -0
- package/blocklySkini/archive/testOrchestration.xml +447 -0
- package/blocklySkini/archive/testOrchestration2.xml +456 -0
- package/blocklySkini/blockly/README.md +77 -0
- package/blocklySkini/blockly/blockly.d.ts +21480 -0
- package/blocklySkini/blockly/blockly.js +25 -0
- package/blocklySkini/blockly/blockly.min.js +2188 -0
- package/blocklySkini/blockly/blockly_compressed.js +1455 -0
- package/blocklySkini/blockly/blockly_compressed.js.map +1 -0
- package/blocklySkini/blockly/blocks/colour.js +122 -0
- package/blocklySkini/blockly/blocks/lists.js +862 -0
- package/blocklySkini/blockly/blocks/logic.js +635 -0
- package/blocklySkini/blockly/blocks/loops.js +357 -0
- package/blocklySkini/blockly/blocks/math.js +566 -0
- package/blocklySkini/blockly/blocks/procedures.js +1072 -0
- package/blocklySkini/blockly/blocks/text.js +923 -0
- package/blocklySkini/blockly/blocks/variables.js +163 -0
- package/blocklySkini/blockly/blocks/variables_dynamic.js +180 -0
- package/blocklySkini/blockly/blocks.d.ts +15 -0
- package/blocklySkini/blockly/blocks.js +27 -0
- package/blocklySkini/blockly/blocks_compressed.js +182 -0
- package/blocklySkini/blockly/blocks_compressed.js.map +1 -0
- package/blocklySkini/blockly/browser.js +36 -0
- package/blocklySkini/blockly/core/block.js +2010 -0
- package/blocklySkini/blockly/core/block_animations.js +203 -0
- package/blocklySkini/blockly/core/block_drag_surface.js +212 -0
- package/blocklySkini/blockly/core/block_dragger.js +378 -0
- package/blocklySkini/blockly/core/block_events.js +548 -0
- package/blocklySkini/blockly/core/block_svg.js +1763 -0
- package/blocklySkini/blockly/core/blockly.js +674 -0
- package/blocklySkini/blockly/core/blocks.js +23 -0
- package/blocklySkini/blockly/core/bubble.js +880 -0
- package/blocklySkini/blockly/core/bubble_dragger.js +274 -0
- package/blocklySkini/blockly/core/comment.js +439 -0
- package/blocklySkini/blockly/core/components/component.js +554 -0
- package/blocklySkini/blockly/core/components/tree/basenode.js +895 -0
- package/blocklySkini/blockly/core/components/tree/treecontrol.js +332 -0
- package/blocklySkini/blockly/core/components/tree/treenode.js +172 -0
- package/blocklySkini/blockly/core/connection.js +682 -0
- package/blocklySkini/blockly/core/connection_checker.js +285 -0
- package/blocklySkini/blockly/core/connection_db.js +295 -0
- package/blocklySkini/blockly/core/constants.js +277 -0
- package/blocklySkini/blockly/core/contextmenu.js +307 -0
- package/blocklySkini/blockly/core/contextmenu_items.js +534 -0
- package/blocklySkini/blockly/core/contextmenu_registry.js +165 -0
- package/blocklySkini/blockly/core/css.js +549 -0
- package/blocklySkini/blockly/core/dropdowndiv.js +776 -0
- package/blocklySkini/blockly/core/events.js +387 -0
- package/blocklySkini/blockly/core/events_abstract.js +106 -0
- package/blocklySkini/blockly/core/extensions.js +450 -0
- package/blocklySkini/blockly/core/field.js +1162 -0
- package/blocklySkini/blockly/core/field_angle.js +562 -0
- package/blocklySkini/blockly/core/field_checkbox.js +220 -0
- package/blocklySkini/blockly/core/field_colour.js +664 -0
- package/blocklySkini/blockly/core/field_dropdown.js +760 -0
- package/blocklySkini/blockly/core/field_image.js +286 -0
- package/blocklySkini/blockly/core/field_label.js +130 -0
- package/blocklySkini/blockly/core/field_label_serializable.js +69 -0
- package/blocklySkini/blockly/core/field_multilineinput.js +299 -0
- package/blocklySkini/blockly/core/field_number.js +317 -0
- package/blocklySkini/blockly/core/field_registry.js +66 -0
- package/blocklySkini/blockly/core/field_textinput.js +616 -0
- package/blocklySkini/blockly/core/field_variable.js +463 -0
- package/blocklySkini/blockly/core/flyout_base.js +1071 -0
- package/blocklySkini/blockly/core/flyout_button.js +325 -0
- package/blocklySkini/blockly/core/flyout_dragger.js +76 -0
- package/blocklySkini/blockly/core/flyout_horizontal.js +388 -0
- package/blocklySkini/blockly/core/flyout_vertical.js +397 -0
- package/blocklySkini/blockly/core/generator.js +482 -0
- package/blocklySkini/blockly/core/gesture.js +993 -0
- package/blocklySkini/blockly/core/grid.js +222 -0
- package/blocklySkini/blockly/core/icon.js +206 -0
- package/blocklySkini/blockly/core/inject.js +487 -0
- package/blocklySkini/blockly/core/input.js +296 -0
- package/blocklySkini/blockly/core/insertion_marker_manager.js +700 -0
- package/blocklySkini/blockly/core/interfaces/i_accessibility.js +72 -0
- package/blocklySkini/blockly/core/interfaces/i_bounded_element.js +31 -0
- package/blocklySkini/blockly/core/interfaces/i_bubble.js +83 -0
- package/blocklySkini/blockly/core/interfaces/i_connection_checker.js +94 -0
- package/blocklySkini/blockly/core/interfaces/i_contextmenu.js +26 -0
- package/blocklySkini/blockly/core/interfaces/i_copyable.js +40 -0
- package/blocklySkini/blockly/core/interfaces/i_deletable.js +27 -0
- package/blocklySkini/blockly/core/interfaces/i_deletearea.js +28 -0
- package/blocklySkini/blockly/core/interfaces/i_flyout.js +178 -0
- package/blocklySkini/blockly/core/interfaces/i_movable.js +27 -0
- package/blocklySkini/blockly/core/interfaces/i_registrable.js +22 -0
- package/blocklySkini/blockly/core/interfaces/i_registrable_field.js +31 -0
- package/blocklySkini/blockly/core/interfaces/i_selectable.js +43 -0
- package/blocklySkini/blockly/core/interfaces/i_styleable.js +33 -0
- package/blocklySkini/blockly/core/interfaces/i_toolbox.js +131 -0
- package/blocklySkini/blockly/core/interfaces/i_toolbox_item.js +148 -0
- package/blocklySkini/blockly/core/keyboard_nav/action.js +26 -0
- package/blocklySkini/blockly/core/keyboard_nav/ast_node.js +684 -0
- package/blocklySkini/blockly/core/keyboard_nav/basic_cursor.js +208 -0
- package/blocklySkini/blockly/core/keyboard_nav/cursor.js +170 -0
- package/blocklySkini/blockly/core/keyboard_nav/flyout_cursor.js +106 -0
- package/blocklySkini/blockly/core/keyboard_nav/key_map.js +190 -0
- package/blocklySkini/blockly/core/keyboard_nav/marker.js +120 -0
- package/blocklySkini/blockly/core/keyboard_nav/navigation.js +1084 -0
- package/blocklySkini/blockly/core/keyboard_nav/tab_navigate_cursor.js +48 -0
- package/blocklySkini/blockly/core/marker_manager.js +183 -0
- package/blocklySkini/blockly/core/menu.js +465 -0
- package/blocklySkini/blockly/core/menuitem.js +280 -0
- package/blocklySkini/blockly/core/msg.js +31 -0
- package/blocklySkini/blockly/core/mutator.js +555 -0
- package/blocklySkini/blockly/core/names.js +186 -0
- package/blocklySkini/blockly/core/options.js +365 -0
- package/blocklySkini/blockly/core/procedures.js +404 -0
- package/blocklySkini/blockly/core/registry.js +265 -0
- package/blocklySkini/blockly/core/rendered_connection.js +565 -0
- package/blocklySkini/blockly/core/renderers/common/block_rendering.js +81 -0
- package/blocklySkini/blockly/core/renderers/common/constants.js +1256 -0
- package/blocklySkini/blockly/core/renderers/common/debugger.js +431 -0
- package/blocklySkini/blockly/core/renderers/common/drawer.js +468 -0
- package/blocklySkini/blockly/core/renderers/common/i_path_object.js +151 -0
- package/blocklySkini/blockly/core/renderers/common/info.js +775 -0
- package/blocklySkini/blockly/core/renderers/common/marker_svg.js +687 -0
- package/blocklySkini/blockly/core/renderers/common/path_object.js +279 -0
- package/blocklySkini/blockly/core/renderers/common/renderer.js +301 -0
- package/blocklySkini/blockly/core/renderers/geras/constants.js +64 -0
- package/blocklySkini/blockly/core/renderers/geras/drawer.js +205 -0
- package/blocklySkini/blockly/core/renderers/geras/highlight_constants.js +311 -0
- package/blocklySkini/blockly/core/renderers/geras/highlighter.js +256 -0
- package/blocklySkini/blockly/core/renderers/geras/info.js +483 -0
- package/blocklySkini/blockly/core/renderers/geras/measurables/inputs.js +67 -0
- package/blocklySkini/blockly/core/renderers/geras/path_object.js +177 -0
- package/blocklySkini/blockly/core/renderers/geras/renderer.js +138 -0
- package/blocklySkini/blockly/core/renderers/measurables/base.js +44 -0
- package/blocklySkini/blockly/core/renderers/measurables/connections.js +114 -0
- package/blocklySkini/blockly/core/renderers/measurables/inputs.js +160 -0
- package/blocklySkini/blockly/core/renderers/measurables/row_elements.js +185 -0
- package/blocklySkini/blockly/core/renderers/measurables/rows.js +532 -0
- package/blocklySkini/blockly/core/renderers/measurables/types.js +349 -0
- package/blocklySkini/blockly/core/renderers/minimalist/constants.js +29 -0
- package/blocklySkini/blockly/core/renderers/minimalist/drawer.js +32 -0
- package/blocklySkini/blockly/core/renderers/minimalist/info.js +45 -0
- package/blocklySkini/blockly/core/renderers/minimalist/renderer.js +70 -0
- package/blocklySkini/blockly/core/renderers/thrasos/info.js +338 -0
- package/blocklySkini/blockly/core/renderers/thrasos/renderer.js +45 -0
- package/blocklySkini/blockly/core/renderers/zelos/constants.js +1002 -0
- package/blocklySkini/blockly/core/renderers/zelos/drawer.js +233 -0
- package/blocklySkini/blockly/core/renderers/zelos/info.js +587 -0
- package/blocklySkini/blockly/core/renderers/zelos/marker_svg.js +148 -0
- package/blocklySkini/blockly/core/renderers/zelos/measurables/inputs.js +47 -0
- package/blocklySkini/blockly/core/renderers/zelos/measurables/row_elements.js +37 -0
- package/blocklySkini/blockly/core/renderers/zelos/measurables/rows.js +108 -0
- package/blocklySkini/blockly/core/renderers/zelos/path_object.js +244 -0
- package/blocklySkini/blockly/core/renderers/zelos/renderer.js +130 -0
- package/blocklySkini/blockly/core/requires.js +84 -0
- package/blocklySkini/blockly/core/scrollbar.js +880 -0
- package/blocklySkini/blockly/core/theme/classic.js +87 -0
- package/blocklySkini/blockly/core/theme/dark.js +33 -0
- package/blocklySkini/blockly/core/theme/deuteranopia.js +104 -0
- package/blocklySkini/blockly/core/theme/highcontrast.js +119 -0
- package/blocklySkini/blockly/core/theme/modern.js +108 -0
- package/blocklySkini/blockly/core/theme/tritanopia.js +103 -0
- package/blocklySkini/blockly/core/theme/zelos.js +106 -0
- package/blocklySkini/blockly/core/theme.js +236 -0
- package/blocklySkini/blockly/core/theme_manager.js +197 -0
- package/blocklySkini/blockly/core/toolbox/category.js +690 -0
- package/blocklySkini/blockly/core/toolbox/collapsible_category.js +294 -0
- package/blocklySkini/blockly/core/toolbox/separator.js +123 -0
- package/blocklySkini/blockly/core/toolbox/toolbox.js +984 -0
- package/blocklySkini/blockly/core/toolbox/toolbox_item.js +145 -0
- package/blocklySkini/blockly/core/toolbox.js +943 -0
- package/blocklySkini/blockly/core/tooltip.js +387 -0
- package/blocklySkini/blockly/core/touch.js +255 -0
- package/blocklySkini/blockly/core/touch_gesture.js +325 -0
- package/blocklySkini/blockly/core/trashcan.js +661 -0
- package/blocklySkini/blockly/core/ui_events.js +85 -0
- package/blocklySkini/blockly/core/utils/aria.js +167 -0
- package/blocklySkini/blockly/core/utils/colour.js +208 -0
- package/blocklySkini/blockly/core/utils/coordinate.js +125 -0
- package/blocklySkini/blockly/core/utils/deprecation.js +34 -0
- package/blocklySkini/blockly/core/utils/dom.js +391 -0
- package/blocklySkini/blockly/core/utils/global.js +37 -0
- package/blocklySkini/blockly/core/utils/idgenerator.js +33 -0
- package/blocklySkini/blockly/core/utils/keycodes.js +164 -0
- package/blocklySkini/blockly/core/utils/math.js +56 -0
- package/blocklySkini/blockly/core/utils/metrics.js +124 -0
- package/blocklySkini/blockly/core/utils/object.js +73 -0
- package/blocklySkini/blockly/core/utils/rect.js +54 -0
- package/blocklySkini/blockly/core/utils/size.js +58 -0
- package/blocklySkini/blockly/core/utils/string.js +284 -0
- package/blocklySkini/blockly/core/utils/style.js +281 -0
- package/blocklySkini/blockly/core/utils/svg.js +181 -0
- package/blocklySkini/blockly/core/utils/svg_paths.js +142 -0
- package/blocklySkini/blockly/core/utils/toolbox.js +401 -0
- package/blocklySkini/blockly/core/utils/useragent.js +110 -0
- package/blocklySkini/blockly/core/utils/xml.js +79 -0
- package/blocklySkini/blockly/core/utils.js +652 -0
- package/blocklySkini/blockly/core/variable_events.js +248 -0
- package/blocklySkini/blockly/core/variable_map.js +414 -0
- package/blocklySkini/blockly/core/variable_model.js +95 -0
- package/blocklySkini/blockly/core/variables.js +571 -0
- package/blocklySkini/blockly/core/variables_dynamic.js +100 -0
- package/blocklySkini/blockly/core/warning.js +200 -0
- package/blocklySkini/blockly/core/widgetdiv.js +241 -0
- package/blocklySkini/blockly/core/workspace.js +786 -0
- package/blocklySkini/blockly/core/workspace_audio.js +153 -0
- package/blocklySkini/blockly/core/workspace_comment.js +373 -0
- package/blocklySkini/blockly/core/workspace_comment_render_svg.js +461 -0
- package/blocklySkini/blockly/core/workspace_comment_svg.js +701 -0
- package/blocklySkini/blockly/core/workspace_drag_surface_svg.js +176 -0
- package/blocklySkini/blockly/core/workspace_dragger.js +85 -0
- package/blocklySkini/blockly/core/workspace_events.js +93 -0
- package/blocklySkini/blockly/core/workspace_svg.js +2661 -0
- package/blocklySkini/blockly/core/ws_comment_events.js +417 -0
- package/blocklySkini/blockly/core/xml.js +827 -0
- package/blocklySkini/blockly/core/zoom_controls.js +449 -0
- package/blocklySkini/blockly/core-browser.js +34 -0
- package/blocklySkini/blockly/core.d.ts +15 -0
- package/blocklySkini/blockly/core.js +38 -0
- package/blocklySkini/blockly/dart.d.ts +15 -0
- package/blocklySkini/blockly/dart.js +27 -0
- package/blocklySkini/blockly/dart_compressed.js +114 -0
- package/blocklySkini/blockly/dart_compressed.js.map +1 -0
- package/blocklySkini/blockly/generators/dart/colour.js +114 -0
- package/blocklySkini/blockly/generators/dart/lists.js +447 -0
- package/blocklySkini/blockly/generators/dart/logic.js +127 -0
- package/blocklySkini/blockly/generators/dart/loops.js +169 -0
- package/blocklySkini/blockly/generators/dart/math.js +485 -0
- package/blocklySkini/blockly/generators/dart/procedures.js +111 -0
- package/blocklySkini/blockly/generators/dart/text.js +339 -0
- package/blocklySkini/blockly/generators/dart/variables.js +32 -0
- package/blocklySkini/blockly/generators/dart/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/dart.js +290 -0
- package/blocklySkini/blockly/generators/javascript/colour.js +89 -0
- package/blocklySkini/blockly/generators/javascript/lists.js +388 -0
- package/blocklySkini/blockly/generators/javascript/logic.js +129 -0
- package/blocklySkini/blockly/generators/javascript/loops.js +184 -0
- package/blocklySkini/blockly/generators/javascript/math.js +409 -0
- package/blocklySkini/blockly/generators/javascript/procedures.js +113 -0
- package/blocklySkini/blockly/generators/javascript/text.js +367 -0
- package/blocklySkini/blockly/generators/javascript/variables.js +32 -0
- package/blocklySkini/blockly/generators/javascript/variables_dynamic.js +23 -0
- package/blocklySkini/blockly/generators/javascript.js +317 -0
- package/blocklySkini/blockly/generators/lua/colour.js +76 -0
- package/blocklySkini/blockly/generators/lua/lists.js +368 -0
- package/blocklySkini/blockly/generators/lua/logic.js +127 -0
- package/blocklySkini/blockly/generators/lua/loops.js +173 -0
- package/blocklySkini/blockly/generators/lua/math.js +423 -0
- package/blocklySkini/blockly/generators/lua/procedures.js +113 -0
- package/blocklySkini/blockly/generators/lua/text.js +353 -0
- package/blocklySkini/blockly/generators/lua/variables.js +32 -0
- package/blocklySkini/blockly/generators/lua/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/lua.js +198 -0
- package/blocklySkini/blockly/generators/php/colour.js +91 -0
- package/blocklySkini/blockly/generators/php/lists.js +498 -0
- package/blocklySkini/blockly/generators/php/logic.js +128 -0
- package/blocklySkini/blockly/generators/php/loops.js +170 -0
- package/blocklySkini/blockly/generators/php/math.js +370 -0
- package/blocklySkini/blockly/generators/php/procedures.js +132 -0
- package/blocklySkini/blockly/generators/php/text.js +271 -0
- package/blocklySkini/blockly/generators/php/variables.js +32 -0
- package/blocklySkini/blockly/generators/php/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/php.js +318 -0
- package/blocklySkini/blockly/generators/python/colour.js +72 -0
- package/blocklySkini/blockly/generators/python/lists.js +349 -0
- package/blocklySkini/blockly/generators/python/logic.js +127 -0
- package/blocklySkini/blockly/generators/python/loops.js +214 -0
- package/blocklySkini/blockly/generators/python/math.js +385 -0
- package/blocklySkini/blockly/generators/python/procedures.js +134 -0
- package/blocklySkini/blockly/generators/python/text.js +293 -0
- package/blocklySkini/blockly/generators/python/variables.js +32 -0
- package/blocklySkini/blockly/generators/python/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/python.js +322 -0
- package/blocklySkini/blockly/index.d.ts +22 -0
- package/blocklySkini/blockly/index.js +24 -0
- package/blocklySkini/blockly/javascript.d.ts +15 -0
- package/blocklySkini/blockly/javascript.js +27 -0
- package/blocklySkini/blockly/javascript_compressed.js +115 -0
- package/blocklySkini/blockly/javascript_compressed.js.map +1 -0
- package/blocklySkini/blockly/lua.d.ts +15 -0
- package/blocklySkini/blockly/lua.js +27 -0
- package/blocklySkini/blockly/lua_compressed.js +94 -0
- package/blocklySkini/blockly/lua_compressed.js.map +1 -0
- package/blocklySkini/blockly/media/1x1.gif +0 -0
- package/blocklySkini/blockly/media/click.mp3 +0 -0
- package/blocklySkini/blockly/media/click.ogg +0 -0
- package/blocklySkini/blockly/media/click.wav +0 -0
- package/blocklySkini/blockly/media/delete.mp3 +0 -0
- package/blocklySkini/blockly/media/delete.ogg +0 -0
- package/blocklySkini/blockly/media/delete.wav +0 -0
- package/blocklySkini/blockly/media/disconnect.mp3 +0 -0
- package/blocklySkini/blockly/media/disconnect.ogg +0 -0
- package/blocklySkini/blockly/media/disconnect.wav +0 -0
- package/blocklySkini/blockly/media/dropdown-arrow.svg +1 -0
- package/blocklySkini/blockly/media/handclosed.cur +0 -0
- package/blocklySkini/blockly/media/handdelete.cur +0 -0
- package/blocklySkini/blockly/media/handopen.cur +0 -0
- package/blocklySkini/blockly/media/pilcrow.png +0 -0
- package/blocklySkini/blockly/media/quote0.png +0 -0
- package/blocklySkini/blockly/media/quote1.png +0 -0
- package/blocklySkini/blockly/media/sprites.png +0 -0
- package/blocklySkini/blockly/media/sprites.svg +74 -0
- package/blocklySkini/blockly/msg/ab.d.ts +16 -0
- package/blocklySkini/blockly/msg/ab.js +447 -0
- package/blocklySkini/blockly/msg/ar.d.ts +16 -0
- package/blocklySkini/blockly/msg/ar.js +447 -0
- package/blocklySkini/blockly/msg/az.d.ts +16 -0
- package/blocklySkini/blockly/msg/az.js +447 -0
- package/blocklySkini/blockly/msg/ba.d.ts +16 -0
- package/blocklySkini/blockly/msg/ba.js +447 -0
- package/blocklySkini/blockly/msg/bcc.d.ts +16 -0
- package/blocklySkini/blockly/msg/bcc.js +447 -0
- package/blocklySkini/blockly/msg/be-tarask.d.ts +16 -0
- package/blocklySkini/blockly/msg/be-tarask.js +447 -0
- package/blocklySkini/blockly/msg/be.d.ts +16 -0
- package/blocklySkini/blockly/msg/be.js +447 -0
- package/blocklySkini/blockly/msg/bg.d.ts +16 -0
- package/blocklySkini/blockly/msg/bg.js +447 -0
- package/blocklySkini/blockly/msg/bn.d.ts +16 -0
- package/blocklySkini/blockly/msg/bn.js +447 -0
- package/blocklySkini/blockly/msg/br.d.ts +16 -0
- package/blocklySkini/blockly/msg/br.js +447 -0
- package/blocklySkini/blockly/msg/ca.d.ts +16 -0
- package/blocklySkini/blockly/msg/ca.js +447 -0
- package/blocklySkini/blockly/msg/constants.d.ts +16 -0
- package/blocklySkini/blockly/msg/cs.d.ts +16 -0
- package/blocklySkini/blockly/msg/cs.js +447 -0
- package/blocklySkini/blockly/msg/da.d.ts +16 -0
- package/blocklySkini/blockly/msg/da.js +447 -0
- package/blocklySkini/blockly/msg/de.d.ts +16 -0
- package/blocklySkini/blockly/msg/de.js +447 -0
- package/blocklySkini/blockly/msg/diq.d.ts +16 -0
- package/blocklySkini/blockly/msg/diq.js +447 -0
- package/blocklySkini/blockly/msg/dty.d.ts +16 -0
- package/blocklySkini/blockly/msg/dty.js +447 -0
- package/blocklySkini/blockly/msg/ee.d.ts +16 -0
- package/blocklySkini/blockly/msg/ee.js +447 -0
- package/blocklySkini/blockly/msg/el.d.ts +16 -0
- package/blocklySkini/blockly/msg/el.js +447 -0
- package/blocklySkini/blockly/msg/en-gb.d.ts +16 -0
- package/blocklySkini/blockly/msg/en-gb.js +447 -0
- package/blocklySkini/blockly/msg/en.d.ts +16 -0
- package/blocklySkini/blockly/msg/en.js +447 -0
- package/blocklySkini/blockly/msg/eo.d.ts +16 -0
- package/blocklySkini/blockly/msg/eo.js +447 -0
- package/blocklySkini/blockly/msg/es.d.ts +16 -0
- package/blocklySkini/blockly/msg/es.js +447 -0
- package/blocklySkini/blockly/msg/et.d.ts +16 -0
- package/blocklySkini/blockly/msg/et.js +447 -0
- package/blocklySkini/blockly/msg/eu.d.ts +16 -0
- package/blocklySkini/blockly/msg/eu.js +447 -0
- package/blocklySkini/blockly/msg/fa.d.ts +16 -0
- package/blocklySkini/blockly/msg/fa.js +447 -0
- package/blocklySkini/blockly/msg/fi.d.ts +16 -0
- package/blocklySkini/blockly/msg/fi.js +447 -0
- package/blocklySkini/blockly/msg/fr.d.ts +16 -0
- package/blocklySkini/blockly/msg/fr.js +447 -0
- package/blocklySkini/blockly/msg/gl.d.ts +16 -0
- package/blocklySkini/blockly/msg/gl.js +447 -0
- package/blocklySkini/blockly/msg/gor.d.ts +16 -0
- package/blocklySkini/blockly/msg/gor.js +447 -0
- package/blocklySkini/blockly/msg/ha.d.ts +16 -0
- package/blocklySkini/blockly/msg/ha.js +447 -0
- package/blocklySkini/blockly/msg/he.d.ts +16 -0
- package/blocklySkini/blockly/msg/he.js +447 -0
- package/blocklySkini/blockly/msg/hi.d.ts +16 -0
- package/blocklySkini/blockly/msg/hi.js +447 -0
- package/blocklySkini/blockly/msg/hrx.d.ts +16 -0
- package/blocklySkini/blockly/msg/hrx.js +447 -0
- package/blocklySkini/blockly/msg/hu.d.ts +16 -0
- package/blocklySkini/blockly/msg/hu.js +447 -0
- package/blocklySkini/blockly/msg/hy.d.ts +16 -0
- package/blocklySkini/blockly/msg/hy.js +447 -0
- package/blocklySkini/blockly/msg/ia.d.ts +16 -0
- package/blocklySkini/blockly/msg/ia.js +447 -0
- package/blocklySkini/blockly/msg/id.d.ts +16 -0
- package/blocklySkini/blockly/msg/id.js +447 -0
- package/blocklySkini/blockly/msg/ig.d.ts +16 -0
- package/blocklySkini/blockly/msg/ig.js +447 -0
- package/blocklySkini/blockly/msg/is.d.ts +16 -0
- package/blocklySkini/blockly/msg/is.js +447 -0
- package/blocklySkini/blockly/msg/it.d.ts +16 -0
- package/blocklySkini/blockly/msg/it.js +447 -0
- package/blocklySkini/blockly/msg/ja.d.ts +16 -0
- package/blocklySkini/blockly/msg/ja.js +447 -0
- package/blocklySkini/blockly/msg/kab.d.ts +16 -0
- package/blocklySkini/blockly/msg/kab.js +447 -0
- package/blocklySkini/blockly/msg/kn.d.ts +16 -0
- package/blocklySkini/blockly/msg/kn.js +447 -0
- package/blocklySkini/blockly/msg/ko.d.ts +16 -0
- package/blocklySkini/blockly/msg/ko.js +447 -0
- package/blocklySkini/blockly/msg/lb.d.ts +16 -0
- package/blocklySkini/blockly/msg/lb.js +447 -0
- package/blocklySkini/blockly/msg/lki.d.ts +16 -0
- package/blocklySkini/blockly/msg/lki.js +447 -0
- package/blocklySkini/blockly/msg/lo.d.ts +16 -0
- package/blocklySkini/blockly/msg/lo.js +447 -0
- package/blocklySkini/blockly/msg/lrc.d.ts +16 -0
- package/blocklySkini/blockly/msg/lrc.js +447 -0
- package/blocklySkini/blockly/msg/lt.d.ts +16 -0
- package/blocklySkini/blockly/msg/lt.js +447 -0
- package/blocklySkini/blockly/msg/lv.d.ts +16 -0
- package/blocklySkini/blockly/msg/lv.js +447 -0
- package/blocklySkini/blockly/msg/mk.d.ts +16 -0
- package/blocklySkini/blockly/msg/mk.js +447 -0
- package/blocklySkini/blockly/msg/mnw.d.ts +16 -0
- package/blocklySkini/blockly/msg/mnw.js +447 -0
- package/blocklySkini/blockly/msg/ms.d.ts +16 -0
- package/blocklySkini/blockly/msg/ms.js +447 -0
- package/blocklySkini/blockly/msg/msg.d.ts +444 -0
- package/blocklySkini/blockly/msg/nb.d.ts +16 -0
- package/blocklySkini/blockly/msg/nb.js +447 -0
- package/blocklySkini/blockly/msg/nl.d.ts +16 -0
- package/blocklySkini/blockly/msg/nl.js +447 -0
- package/blocklySkini/blockly/msg/oc.d.ts +16 -0
- package/blocklySkini/blockly/msg/oc.js +447 -0
- package/blocklySkini/blockly/msg/pl.d.ts +16 -0
- package/blocklySkini/blockly/msg/pl.js +447 -0
- package/blocklySkini/blockly/msg/pms.d.ts +16 -0
- package/blocklySkini/blockly/msg/pms.js +447 -0
- package/blocklySkini/blockly/msg/pt-br.d.ts +16 -0
- package/blocklySkini/blockly/msg/pt-br.js +447 -0
- package/blocklySkini/blockly/msg/pt.d.ts +16 -0
- package/blocklySkini/blockly/msg/pt.js +447 -0
- package/blocklySkini/blockly/msg/qqq.d.ts +16 -0
- package/blocklySkini/blockly/msg/ro.d.ts +16 -0
- package/blocklySkini/blockly/msg/ro.js +447 -0
- package/blocklySkini/blockly/msg/ru.d.ts +16 -0
- package/blocklySkini/blockly/msg/ru.js +447 -0
- package/blocklySkini/blockly/msg/sc.d.ts +16 -0
- package/blocklySkini/blockly/msg/sc.js +447 -0
- package/blocklySkini/blockly/msg/sd.d.ts +16 -0
- package/blocklySkini/blockly/msg/sd.js +447 -0
- package/blocklySkini/blockly/msg/shn.d.ts +16 -0
- package/blocklySkini/blockly/msg/shn.js +447 -0
- package/blocklySkini/blockly/msg/sk.d.ts +16 -0
- package/blocklySkini/blockly/msg/sk.js +447 -0
- package/blocklySkini/blockly/msg/skr-arab.d.ts +16 -0
- package/blocklySkini/blockly/msg/skr-arab.js +447 -0
- package/blocklySkini/blockly/msg/sl.d.ts +16 -0
- package/blocklySkini/blockly/msg/sl.js +447 -0
- package/blocklySkini/blockly/msg/sq.d.ts +16 -0
- package/blocklySkini/blockly/msg/sq.js +447 -0
- package/blocklySkini/blockly/msg/sr-latn.d.ts +16 -0
- package/blocklySkini/blockly/msg/sr-latn.js +447 -0
- package/blocklySkini/blockly/msg/sr.d.ts +16 -0
- package/blocklySkini/blockly/msg/sr.js +447 -0
- package/blocklySkini/blockly/msg/sv.d.ts +16 -0
- package/blocklySkini/blockly/msg/sv.js +447 -0
- package/blocklySkini/blockly/msg/synonyms.d.ts +16 -0
- package/blocklySkini/blockly/msg/ta.d.ts +16 -0
- package/blocklySkini/blockly/msg/ta.js +447 -0
- package/blocklySkini/blockly/msg/tcy.d.ts +16 -0
- package/blocklySkini/blockly/msg/tcy.js +447 -0
- package/blocklySkini/blockly/msg/te.d.ts +16 -0
- package/blocklySkini/blockly/msg/te.js +447 -0
- package/blocklySkini/blockly/msg/th.d.ts +16 -0
- package/blocklySkini/blockly/msg/th.js +447 -0
- package/blocklySkini/blockly/msg/tl.d.ts +16 -0
- package/blocklySkini/blockly/msg/tl.js +447 -0
- package/blocklySkini/blockly/msg/tlh.d.ts +16 -0
- package/blocklySkini/blockly/msg/tlh.js +447 -0
- package/blocklySkini/blockly/msg/tr.d.ts +16 -0
- package/blocklySkini/blockly/msg/tr.js +447 -0
- package/blocklySkini/blockly/msg/ug-arab.d.ts +16 -0
- package/blocklySkini/blockly/msg/ug-arab.js +447 -0
- package/blocklySkini/blockly/msg/uk.d.ts +16 -0
- package/blocklySkini/blockly/msg/uk.js +447 -0
- package/blocklySkini/blockly/msg/ur.d.ts +16 -0
- package/blocklySkini/blockly/msg/ur.js +447 -0
- package/blocklySkini/blockly/msg/vi.d.ts +16 -0
- package/blocklySkini/blockly/msg/vi.js +447 -0
- package/blocklySkini/blockly/msg/xmf.d.ts +16 -0
- package/blocklySkini/blockly/msg/xmf.js +447 -0
- package/blocklySkini/blockly/msg/yo.d.ts +16 -0
- package/blocklySkini/blockly/msg/yo.js +447 -0
- package/blocklySkini/blockly/msg/zh-hans.d.ts +16 -0
- package/blocklySkini/blockly/msg/zh-hans.js +447 -0
- package/blocklySkini/blockly/msg/zh-hant.d.ts +16 -0
- package/blocklySkini/blockly/msg/zh-hant.js +447 -0
- package/blocklySkini/blockly/node.js +35 -0
- package/blocklySkini/blockly/package.json +84 -0
- package/blocklySkini/blockly/php.d.ts +15 -0
- package/blocklySkini/blockly/php.js +27 -0
- package/blocklySkini/blockly/php_compressed.js +103 -0
- package/blocklySkini/blockly/php_compressed.js.map +1 -0
- package/blocklySkini/blockly/python.d.ts +15 -0
- package/blocklySkini/blockly/python.js +27 -0
- package/blocklySkini/blockly/python_compressed.js +98 -0
- package/blocklySkini/blockly/python_compressed.js.map +1 -0
- package/blocklySkini/blocklySkini.html +81 -0
- package/blocklySkini/orchestrations/.xml +1 -0
- package/blocklySkini/orchestrations/BluesSkini-1.xml +231 -0
- package/blocklySkini/orchestrations/BluesSkini-2.xml +741 -0
- package/blocklySkini/orchestrations/BluesSkini-3.xml +731 -0
- package/blocklySkini/orchestrations/BluesSkini-4.xml +695 -0
- package/blocklySkini/orchestrations/BluesSkini-5.xml +731 -0
- package/blocklySkini/orchestrations/BluesSkini.xml +704 -0
- package/blocklySkini/orchestrations/FunkBitwig-1.xml +778 -0
- package/blocklySkini/orchestrations/FunkBitwig-2.xml +471 -0
- package/blocklySkini/orchestrations/JouerLeBonInstrument1-1.xml +784 -0
- package/blocklySkini/orchestrations/MajeurMineur-1.xml +638 -0
- package/blocklySkini/orchestrations/Opus5-3 - Copie.xml +1041 -0
- package/blocklySkini/orchestrations/Opus5-3.xml +1128 -0
- package/blocklySkini/orchestrations/Quatuor1-1.xml +357 -0
- package/blocklySkini/orchestrations/TechnoBitwig-1.xml +221 -0
- package/blocklySkini/orchestrations/TestBlockly.xml +497 -0
- package/blocklySkini/orchestrations/TestBlockly1.xml +500 -0
- package/blocklySkini/orchestrations/TestBlockly2.xml +792 -0
- package/blocklySkini/orchestrations/TestBlockly3-1.xml +1182 -0
- package/blocklySkini/orchestrations/TestBlockly3.xml +1251 -0
- package/blocklySkini/orchestrations/TestFunction.xml +143 -0
- package/blocklySkini/orchestrations/TestIf.xml +80 -0
- package/blocklySkini/orchestrations/TestLoop.xml +127 -0
- package/blocklySkini/orchestrations/TestOrchestration2.xml +460 -0
- package/blocklySkini/orchestrations/TestPrint.xml +70 -0
- package/blocklySkini/orchestrations/TestSubMod.xml +81 -0
- package/blocklySkini/orchestrations/Testlogic.xml +113 -0
- package/blocklySkini/orchestrations/TrouveLaPercu-1.xml +813 -0
- package/blocklySkini/orchestrations/TrouveLaPercu-2.xml +813 -0
- package/blocklySkini/orchestrations/bar.xml +496 -0
- package/blocklySkini/orchestrations/bar2.xml +496 -0
- package/blocklySkini/orchestrations/foo.xml +500 -0
- package/blocklySkini/orchestrations/opus5Blockly - Copie.xml +496 -0
- package/blocklySkini/orchestrations/opus5Blockly-3.xml +868 -0
- package/blocklySkini/orchestrations/opus5Blockly.xml +496 -0
- package/blocklySkini/orchestrations/testOrchestration3.xml +483 -0
- package/blocklySkini/orchestrations/testOrchestration4.xml +487 -0
- package/blocklySkini/scripts/hiphop_blocks.js +6104 -0
- package/blocklySkini/scripts/main2.js +801 -0
- package/blocklySkini/styles/index.css +320 -0
- package/blocklySkini/styles/material.css +11552 -0
- package/package.json +3 -3
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2016 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Components for creating connections between blocks.
|
|
9
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
goog.provide('Blockly.RenderedConnection');
|
|
14
|
+
|
|
15
|
+
goog.require('Blockly.Connection');
|
|
16
|
+
goog.require('Blockly.Events');
|
|
17
|
+
goog.require('Blockly.utils');
|
|
18
|
+
goog.require('Blockly.utils.Coordinate');
|
|
19
|
+
goog.require('Blockly.utils.deprecation');
|
|
20
|
+
goog.require('Blockly.utils.dom');
|
|
21
|
+
goog.require('Blockly.utils.object');
|
|
22
|
+
goog.require('Blockly.utils.Svg');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Class for a connection between blocks that may be rendered on screen.
|
|
27
|
+
* @param {!Blockly.BlockSvg} source The block establishing this connection.
|
|
28
|
+
* @param {number} type The type of the connection.
|
|
29
|
+
* @extends {Blockly.Connection}
|
|
30
|
+
* @constructor
|
|
31
|
+
*/
|
|
32
|
+
Blockly.RenderedConnection = function(source, type) {
|
|
33
|
+
Blockly.RenderedConnection.superClass_.constructor.call(this, source, type);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Connection database for connections of this type on the current workspace.
|
|
37
|
+
* @const {!Blockly.ConnectionDB}
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
this.db_ = source.workspace.connectionDBList[type];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Connection database for connections compatible with this type on the
|
|
44
|
+
* current workspace.
|
|
45
|
+
* @const {!Blockly.ConnectionDB}
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
this.dbOpposite_ = source.workspace
|
|
49
|
+
.connectionDBList[Blockly.OPPOSITE_TYPE[type]];
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Workspace units, (0, 0) is top left of block.
|
|
53
|
+
* @type {!Blockly.utils.Coordinate}
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
this.offsetInBlock_ = new Blockly.utils.Coordinate(0, 0);
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Describes the state of this connection's tracked-ness.
|
|
60
|
+
* @type {Blockly.RenderedConnection.TrackedState}
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
this.trackedState_ = Blockly.RenderedConnection.TrackedState.WILL_TRACK;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Connection this connection connects to. Null if not connected.
|
|
67
|
+
* @type {Blockly.RenderedConnection}
|
|
68
|
+
*/
|
|
69
|
+
this.targetConnection = null;
|
|
70
|
+
};
|
|
71
|
+
Blockly.utils.object.inherits(Blockly.RenderedConnection, Blockly.Connection);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Enum for different kinds of tracked states.
|
|
75
|
+
*
|
|
76
|
+
* WILL_TRACK means that this connection will add itself to
|
|
77
|
+
* the db on the next moveTo call it receives.
|
|
78
|
+
*
|
|
79
|
+
* UNTRACKED means that this connection will not add
|
|
80
|
+
* itself to the database until setTracking(true) is explicitly called.
|
|
81
|
+
*
|
|
82
|
+
* TRACKED means that this connection is currently being tracked.
|
|
83
|
+
* @enum {number}
|
|
84
|
+
*/
|
|
85
|
+
Blockly.RenderedConnection.TrackedState = {
|
|
86
|
+
WILL_TRACK: -1,
|
|
87
|
+
UNTRACKED: 0,
|
|
88
|
+
TRACKED: 1
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Dispose of this connection. Remove it from the database (if it is
|
|
93
|
+
* tracked) and call the super-function to deal with connected blocks.
|
|
94
|
+
* @override
|
|
95
|
+
* @package
|
|
96
|
+
*/
|
|
97
|
+
Blockly.RenderedConnection.prototype.dispose = function() {
|
|
98
|
+
Blockly.RenderedConnection.superClass_.dispose.call(this);
|
|
99
|
+
if (this.trackedState_ == Blockly.RenderedConnection.TrackedState.TRACKED) {
|
|
100
|
+
this.db_.removeConnection(this, this.y);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get the source block for this connection.
|
|
106
|
+
* @return {!Blockly.BlockSvg} The source block.
|
|
107
|
+
* @override
|
|
108
|
+
*/
|
|
109
|
+
Blockly.RenderedConnection.prototype.getSourceBlock = function() {
|
|
110
|
+
return /** @type {!Blockly.BlockSvg} */ (
|
|
111
|
+
Blockly.RenderedConnection.superClass_.getSourceBlock.call(this));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Returns the block that this connection connects to.
|
|
116
|
+
* @return {Blockly.BlockSvg} The connected block or null if none is connected.
|
|
117
|
+
* @override
|
|
118
|
+
*/
|
|
119
|
+
Blockly.RenderedConnection.prototype.targetBlock = function() {
|
|
120
|
+
return /** @type {Blockly.BlockSvg} */ (
|
|
121
|
+
Blockly.RenderedConnection.superClass_.targetBlock.call(this));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Returns the distance between this connection and another connection in
|
|
126
|
+
* workspace units.
|
|
127
|
+
* @param {!Blockly.Connection} otherConnection The other connection to measure
|
|
128
|
+
* the distance to.
|
|
129
|
+
* @return {number} The distance between connections, in workspace units.
|
|
130
|
+
*/
|
|
131
|
+
Blockly.RenderedConnection.prototype.distanceFrom = function(otherConnection) {
|
|
132
|
+
var xDiff = this.x - otherConnection.x;
|
|
133
|
+
var yDiff = this.y - otherConnection.y;
|
|
134
|
+
return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Move the block(s) belonging to the connection to a point where they don't
|
|
139
|
+
* visually interfere with the specified connection.
|
|
140
|
+
* @param {!Blockly.Connection} staticConnection The connection to move away
|
|
141
|
+
* from.
|
|
142
|
+
* @package
|
|
143
|
+
*/
|
|
144
|
+
Blockly.RenderedConnection.prototype.bumpAwayFrom = function(staticConnection) {
|
|
145
|
+
if (this.sourceBlock_.workspace.isDragging()) {
|
|
146
|
+
// Don't move blocks around while the user is doing the same.
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
// Move the root block.
|
|
150
|
+
var rootBlock = this.sourceBlock_.getRootBlock();
|
|
151
|
+
if (rootBlock.isInFlyout) {
|
|
152
|
+
// Don't move blocks around in a flyout.
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
var reverse = false;
|
|
156
|
+
if (!rootBlock.isMovable()) {
|
|
157
|
+
// Can't bump an uneditable block away.
|
|
158
|
+
// Check to see if the other block is movable.
|
|
159
|
+
rootBlock = staticConnection.getSourceBlock().getRootBlock();
|
|
160
|
+
if (!rootBlock.isMovable()) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
// Swap the connections and move the 'static' connection instead.
|
|
164
|
+
staticConnection = this;
|
|
165
|
+
reverse = true;
|
|
166
|
+
}
|
|
167
|
+
// Raise it to the top for extra visibility.
|
|
168
|
+
var selected = Blockly.selected == rootBlock;
|
|
169
|
+
selected || rootBlock.addSelect();
|
|
170
|
+
var dx = (staticConnection.x + Blockly.SNAP_RADIUS +
|
|
171
|
+
Math.floor(Math.random() * Blockly.BUMP_RANDOMNESS)) - this.x;
|
|
172
|
+
var dy = (staticConnection.y + Blockly.SNAP_RADIUS +
|
|
173
|
+
Math.floor(Math.random() * Blockly.BUMP_RANDOMNESS)) - this.y;
|
|
174
|
+
if (reverse) {
|
|
175
|
+
// When reversing a bump due to an uneditable block, bump up.
|
|
176
|
+
dy = -dy;
|
|
177
|
+
}
|
|
178
|
+
if (rootBlock.RTL) {
|
|
179
|
+
dx = (staticConnection.x - Blockly.SNAP_RADIUS -
|
|
180
|
+
Math.floor(Math.random() * Blockly.BUMP_RANDOMNESS)) - this.x;
|
|
181
|
+
}
|
|
182
|
+
rootBlock.moveBy(dx, dy);
|
|
183
|
+
selected || rootBlock.removeSelect();
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Change the connection's coordinates.
|
|
188
|
+
* @param {number} x New absolute x coordinate, in workspace coordinates.
|
|
189
|
+
* @param {number} y New absolute y coordinate, in workspace coordinates.
|
|
190
|
+
*/
|
|
191
|
+
Blockly.RenderedConnection.prototype.moveTo = function(x, y) {
|
|
192
|
+
if (this.trackedState_ == Blockly.RenderedConnection.TrackedState.WILL_TRACK) {
|
|
193
|
+
this.db_.addConnection(this, y);
|
|
194
|
+
this.trackedState_ = Blockly.RenderedConnection.TrackedState.TRACKED;
|
|
195
|
+
} else if (this.trackedState_ == Blockly.RenderedConnection
|
|
196
|
+
.TrackedState.TRACKED) {
|
|
197
|
+
this.db_.removeConnection(this, this.y);
|
|
198
|
+
this.db_.addConnection(this, y);
|
|
199
|
+
}
|
|
200
|
+
this.x = x;
|
|
201
|
+
this.y = y;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Change the connection's coordinates.
|
|
206
|
+
* @param {number} dx Change to x coordinate, in workspace units.
|
|
207
|
+
* @param {number} dy Change to y coordinate, in workspace units.
|
|
208
|
+
*/
|
|
209
|
+
Blockly.RenderedConnection.prototype.moveBy = function(dx, dy) {
|
|
210
|
+
this.moveTo(this.x + dx, this.y + dy);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Move this connection to the location given by its offset within the block and
|
|
215
|
+
* the location of the block's top left corner.
|
|
216
|
+
* @param {!Blockly.utils.Coordinate} blockTL The location of the top left
|
|
217
|
+
* corner of the block, in workspace coordinates.
|
|
218
|
+
*/
|
|
219
|
+
Blockly.RenderedConnection.prototype.moveToOffset = function(blockTL) {
|
|
220
|
+
this.moveTo(blockTL.x + this.offsetInBlock_.x,
|
|
221
|
+
blockTL.y + this.offsetInBlock_.y);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Set the offset of this connection relative to the top left of its block.
|
|
226
|
+
* @param {number} x The new relative x, in workspace units.
|
|
227
|
+
* @param {number} y The new relative y, in workspace units.
|
|
228
|
+
*/
|
|
229
|
+
Blockly.RenderedConnection.prototype.setOffsetInBlock = function(x, y) {
|
|
230
|
+
this.offsetInBlock_.x = x;
|
|
231
|
+
this.offsetInBlock_.y = y;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Get the offset of this connection relative to the top left of its block.
|
|
236
|
+
* @return {!Blockly.utils.Coordinate} The offset of the connection.
|
|
237
|
+
* @package
|
|
238
|
+
*/
|
|
239
|
+
Blockly.RenderedConnection.prototype.getOffsetInBlock = function() {
|
|
240
|
+
return this.offsetInBlock_;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Move the blocks on either side of this connection right next to each other.
|
|
245
|
+
* @package
|
|
246
|
+
*/
|
|
247
|
+
Blockly.RenderedConnection.prototype.tighten = function() {
|
|
248
|
+
var dx = this.targetConnection.x - this.x;
|
|
249
|
+
var dy = this.targetConnection.y - this.y;
|
|
250
|
+
if (dx != 0 || dy != 0) {
|
|
251
|
+
var block = this.targetBlock();
|
|
252
|
+
var svgRoot = block.getSvgRoot();
|
|
253
|
+
if (!svgRoot) {
|
|
254
|
+
throw Error('block is not rendered.');
|
|
255
|
+
}
|
|
256
|
+
// Workspace coordinates.
|
|
257
|
+
var xy = Blockly.utils.getRelativeXY(svgRoot);
|
|
258
|
+
block.getSvgRoot().setAttribute('transform',
|
|
259
|
+
'translate(' + (xy.x - dx) + ',' + (xy.y - dy) + ')');
|
|
260
|
+
block.moveConnections(-dx, -dy);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Find the closest compatible connection to this connection.
|
|
266
|
+
* All parameters are in workspace units.
|
|
267
|
+
* @param {number} maxLimit The maximum radius to another connection.
|
|
268
|
+
* @param {!Blockly.utils.Coordinate} dxy Offset between this connection's location
|
|
269
|
+
* in the database and the current location (as a result of dragging).
|
|
270
|
+
* @return {!{connection: ?Blockly.Connection, radius: number}} Contains two
|
|
271
|
+
* properties: 'connection' which is either another connection or null,
|
|
272
|
+
* and 'radius' which is the distance.
|
|
273
|
+
*/
|
|
274
|
+
Blockly.RenderedConnection.prototype.closest = function(maxLimit, dxy) {
|
|
275
|
+
return this.dbOpposite_.searchForClosest(this, maxLimit, dxy);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Add highlighting around this connection.
|
|
280
|
+
*/
|
|
281
|
+
Blockly.RenderedConnection.prototype.highlight = function() {
|
|
282
|
+
var steps;
|
|
283
|
+
var sourceBlockSvg = /** @type {!Blockly.BlockSvg} */ (this.sourceBlock_);
|
|
284
|
+
var renderConstants = sourceBlockSvg.workspace.getRenderer().getConstants();
|
|
285
|
+
var shape = renderConstants.shapeFor(this);
|
|
286
|
+
if (this.type == Blockly.INPUT_VALUE || this.type == Blockly.OUTPUT_VALUE) {
|
|
287
|
+
// Vertical line, puzzle tab, vertical line.
|
|
288
|
+
var yLen = renderConstants.TAB_OFFSET_FROM_TOP;
|
|
289
|
+
steps = Blockly.utils.svgPaths.moveBy(0, -yLen) +
|
|
290
|
+
Blockly.utils.svgPaths.lineOnAxis('v', yLen) +
|
|
291
|
+
shape.pathDown +
|
|
292
|
+
Blockly.utils.svgPaths.lineOnAxis('v', yLen);
|
|
293
|
+
} else {
|
|
294
|
+
var xLen =
|
|
295
|
+
renderConstants.NOTCH_OFFSET_LEFT - renderConstants.CORNER_RADIUS;
|
|
296
|
+
// Horizontal line, notch, horizontal line.
|
|
297
|
+
steps = Blockly.utils.svgPaths.moveBy(-xLen, 0) +
|
|
298
|
+
Blockly.utils.svgPaths.lineOnAxis('h', xLen) +
|
|
299
|
+
shape.pathLeft +
|
|
300
|
+
Blockly.utils.svgPaths.lineOnAxis('h', xLen);
|
|
301
|
+
}
|
|
302
|
+
var xy = this.sourceBlock_.getRelativeToSurfaceXY();
|
|
303
|
+
var x = this.x - xy.x;
|
|
304
|
+
var y = this.y - xy.y;
|
|
305
|
+
Blockly.Connection.highlightedPath_ = Blockly.utils.dom.createSvgElement(
|
|
306
|
+
Blockly.utils.Svg.PATH,
|
|
307
|
+
{
|
|
308
|
+
'class': 'blocklyHighlightedConnectionPath',
|
|
309
|
+
'd': steps,
|
|
310
|
+
transform: 'translate(' + x + ',' + y + ')' +
|
|
311
|
+
(this.sourceBlock_.RTL ? ' scale(-1 1)' : '')
|
|
312
|
+
},
|
|
313
|
+
this.sourceBlock_.getSvgRoot());
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Remove the highlighting around this connection.
|
|
318
|
+
*/
|
|
319
|
+
Blockly.RenderedConnection.prototype.unhighlight = function() {
|
|
320
|
+
Blockly.utils.dom.removeNode(Blockly.Connection.highlightedPath_);
|
|
321
|
+
delete Blockly.Connection.highlightedPath_;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Set whether this connections is tracked in the database or not.
|
|
326
|
+
* @param {boolean} doTracking If true, start tracking. If false, stop tracking.
|
|
327
|
+
* @package
|
|
328
|
+
*/
|
|
329
|
+
Blockly.RenderedConnection.prototype.setTracking = function(doTracking) {
|
|
330
|
+
if ((doTracking && this.trackedState_ ==
|
|
331
|
+
Blockly.RenderedConnection.TrackedState.TRACKED) ||
|
|
332
|
+
(!doTracking && this.trackedState_ ==
|
|
333
|
+
Blockly.RenderedConnection.TrackedState.UNTRACKED)) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
if (this.sourceBlock_.isInFlyout) {
|
|
337
|
+
// Don't bother maintaining a database of connections in a flyout.
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
if (doTracking) {
|
|
341
|
+
this.db_.addConnection(this, this.y);
|
|
342
|
+
this.trackedState_ = Blockly.RenderedConnection.TrackedState.TRACKED;
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
if (this.trackedState_ == Blockly.RenderedConnection.TrackedState.TRACKED) {
|
|
346
|
+
this.db_.removeConnection(this, this.y);
|
|
347
|
+
}
|
|
348
|
+
this.trackedState_ = Blockly.RenderedConnection.TrackedState.UNTRACKED;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Stop tracking this connection, as well as all down-stream connections on
|
|
353
|
+
* any block attached to this connection. This happens when a block is
|
|
354
|
+
* collapsed.
|
|
355
|
+
*
|
|
356
|
+
* Also closes down-stream icons/bubbles.
|
|
357
|
+
* @package
|
|
358
|
+
*/
|
|
359
|
+
Blockly.RenderedConnection.prototype.stopTrackingAll = function() {
|
|
360
|
+
this.setTracking(false);
|
|
361
|
+
if (this.targetConnection) {
|
|
362
|
+
var blocks = this.targetBlock().getDescendants(false);
|
|
363
|
+
for (var i = 0; i < blocks.length; i++) {
|
|
364
|
+
var block = blocks[i];
|
|
365
|
+
// Stop tracking connections of all children.
|
|
366
|
+
var connections = block.getConnections_(true);
|
|
367
|
+
for (var j = 0; j < connections.length; j++) {
|
|
368
|
+
connections[j].setTracking(false);
|
|
369
|
+
}
|
|
370
|
+
// Close all bubbles of all children.
|
|
371
|
+
var icons = block.getIcons();
|
|
372
|
+
for (var j = 0; j < icons.length; j++) {
|
|
373
|
+
icons[j].setVisible(false);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Start tracking this connection, as well as all down-stream connections on
|
|
381
|
+
* any block attached to this connection. This happens when a block is expanded.
|
|
382
|
+
* @return {!Array.<!Blockly.Block>} List of blocks to render.
|
|
383
|
+
*/
|
|
384
|
+
Blockly.RenderedConnection.prototype.startTrackingAll = function() {
|
|
385
|
+
this.setTracking(true);
|
|
386
|
+
// All blocks that are not tracked must start tracking before any
|
|
387
|
+
// rendering takes place, since rendering requires knowing the dimensions
|
|
388
|
+
// of lower blocks. Also, since rendering a block renders all its parents,
|
|
389
|
+
// we only need to render the leaf nodes.
|
|
390
|
+
var renderList = [];
|
|
391
|
+
if (this.type != Blockly.INPUT_VALUE && this.type != Blockly.NEXT_STATEMENT) {
|
|
392
|
+
// Only spider down.
|
|
393
|
+
return renderList;
|
|
394
|
+
}
|
|
395
|
+
var block = this.targetBlock();
|
|
396
|
+
if (block) {
|
|
397
|
+
var connections;
|
|
398
|
+
if (block.isCollapsed()) {
|
|
399
|
+
// This block should only be partially revealed since it is collapsed.
|
|
400
|
+
connections = [];
|
|
401
|
+
block.outputConnection && connections.push(block.outputConnection);
|
|
402
|
+
block.nextConnection && connections.push(block.nextConnection);
|
|
403
|
+
block.previousConnection && connections.push(block.previousConnection);
|
|
404
|
+
} else {
|
|
405
|
+
// Show all connections of this block.
|
|
406
|
+
connections = block.getConnections_(true);
|
|
407
|
+
}
|
|
408
|
+
for (var i = 0; i < connections.length; i++) {
|
|
409
|
+
renderList.push.apply(renderList, connections[i].startTrackingAll());
|
|
410
|
+
}
|
|
411
|
+
if (!renderList.length) {
|
|
412
|
+
// Leaf block.
|
|
413
|
+
renderList[0] = block;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return renderList;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Check if the two connections can be dragged to connect to each other.
|
|
421
|
+
* @param {!Blockly.Connection} candidate A nearby connection to check.
|
|
422
|
+
* @param {number=} maxRadius The maximum radius allowed for connections, in
|
|
423
|
+
* workspace units.
|
|
424
|
+
* @return {boolean} True if the connection is allowed, false otherwise.
|
|
425
|
+
* @deprecated July 2020
|
|
426
|
+
*/
|
|
427
|
+
Blockly.RenderedConnection.prototype.isConnectionAllowed = function(candidate,
|
|
428
|
+
maxRadius) {
|
|
429
|
+
Blockly.utils.deprecation.warn(
|
|
430
|
+
'RenderedConnection.prototype.isConnectionAllowed',
|
|
431
|
+
'July 2020',
|
|
432
|
+
'July 2021',
|
|
433
|
+
'Blockly.Workspace.prototype.getConnectionChecker().canConnect');
|
|
434
|
+
if (this.distanceFrom(candidate) > maxRadius) {
|
|
435
|
+
return false;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this,
|
|
439
|
+
candidate);
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Behavior after a connection attempt fails.
|
|
444
|
+
* @param {!Blockly.Connection} otherConnection Connection that this connection
|
|
445
|
+
* failed to connect to.
|
|
446
|
+
* @package
|
|
447
|
+
*/
|
|
448
|
+
Blockly.RenderedConnection.prototype.onFailedConnect = function(
|
|
449
|
+
otherConnection) {
|
|
450
|
+
this.bumpAwayFrom(otherConnection);
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Disconnect two blocks that are connected by this connection.
|
|
456
|
+
* @param {!Blockly.Block} parentBlock The superior block.
|
|
457
|
+
* @param {!Blockly.Block} childBlock The inferior block.
|
|
458
|
+
* @private
|
|
459
|
+
*/
|
|
460
|
+
Blockly.RenderedConnection.prototype.disconnectInternal_ = function(parentBlock,
|
|
461
|
+
childBlock) {
|
|
462
|
+
Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this,
|
|
463
|
+
parentBlock, childBlock);
|
|
464
|
+
// Rerender the parent so that it may reflow.
|
|
465
|
+
if (parentBlock.rendered) {
|
|
466
|
+
parentBlock.render();
|
|
467
|
+
}
|
|
468
|
+
if (childBlock.rendered) {
|
|
469
|
+
childBlock.updateDisabled();
|
|
470
|
+
childBlock.render();
|
|
471
|
+
// Reset visibility, since the child is now a top block.
|
|
472
|
+
childBlock.getSvgRoot().style.display = 'block';
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Respawn the shadow block if there was one connected to the this connection.
|
|
478
|
+
* Render/rerender blocks as needed.
|
|
479
|
+
* @private
|
|
480
|
+
*/
|
|
481
|
+
Blockly.RenderedConnection.prototype.respawnShadow_ = function() {
|
|
482
|
+
Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);
|
|
483
|
+
var blockShadow = this.targetBlock();
|
|
484
|
+
if (!blockShadow) {
|
|
485
|
+
// This connection must not have a shadowDom_.
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
blockShadow.initSvg();
|
|
489
|
+
blockShadow.render(false);
|
|
490
|
+
|
|
491
|
+
var parentBlock = this.getSourceBlock();
|
|
492
|
+
if (parentBlock.rendered) {
|
|
493
|
+
parentBlock.render();
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Find all nearby compatible connections to this connection.
|
|
499
|
+
* Type checking does not apply, since this function is used for bumping.
|
|
500
|
+
* @param {number} maxLimit The maximum radius to another connection, in
|
|
501
|
+
* workspace units.
|
|
502
|
+
* @return {!Array.<!Blockly.Connection>} List of connections.
|
|
503
|
+
* @package
|
|
504
|
+
*/
|
|
505
|
+
Blockly.RenderedConnection.prototype.neighbours = function(maxLimit) {
|
|
506
|
+
return this.dbOpposite_.getNeighbours(this, maxLimit);
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Connect two connections together. This is the connection on the superior
|
|
511
|
+
* block. Rerender blocks as needed.
|
|
512
|
+
* @param {!Blockly.Connection} childConnection Connection on inferior block.
|
|
513
|
+
* @protected
|
|
514
|
+
*/
|
|
515
|
+
Blockly.RenderedConnection.prototype.connect_ = function(childConnection) {
|
|
516
|
+
Blockly.RenderedConnection.superClass_.connect_.call(this, childConnection);
|
|
517
|
+
|
|
518
|
+
var parentConnection = this;
|
|
519
|
+
var parentBlock = parentConnection.getSourceBlock();
|
|
520
|
+
var childBlock = childConnection.getSourceBlock();
|
|
521
|
+
var parentRendered = parentBlock.rendered;
|
|
522
|
+
var childRendered = childBlock.rendered;
|
|
523
|
+
|
|
524
|
+
if (parentRendered) {
|
|
525
|
+
parentBlock.updateDisabled();
|
|
526
|
+
}
|
|
527
|
+
if (childRendered) {
|
|
528
|
+
childBlock.updateDisabled();
|
|
529
|
+
}
|
|
530
|
+
if (parentRendered && childRendered) {
|
|
531
|
+
if (parentConnection.type == Blockly.NEXT_STATEMENT ||
|
|
532
|
+
parentConnection.type == Blockly.PREVIOUS_STATEMENT) {
|
|
533
|
+
// Child block may need to square off its corners if it is in a stack.
|
|
534
|
+
// Rendering a child will render its parent.
|
|
535
|
+
childBlock.render();
|
|
536
|
+
} else {
|
|
537
|
+
// Child block does not change shape. Rendering the parent node will
|
|
538
|
+
// move its connected children into position.
|
|
539
|
+
parentBlock.render();
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// The input the child block is connected to (if any).
|
|
544
|
+
var parentInput = parentBlock.getInputWithBlock(childBlock);
|
|
545
|
+
if (parentInput) {
|
|
546
|
+
var visible = parentInput.isVisible();
|
|
547
|
+
childBlock.getSvgRoot().style.display = visible ? 'block' : 'none';
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Function to be called when this connection's compatible types have changed.
|
|
553
|
+
* @protected
|
|
554
|
+
*/
|
|
555
|
+
Blockly.RenderedConnection.prototype.onCheckChanged_ = function() {
|
|
556
|
+
// The new value type may not be compatible with the existing connection.
|
|
557
|
+
if (this.isConnected() && (!this.targetConnection ||
|
|
558
|
+
!this.getConnectionChecker().canConnect(
|
|
559
|
+
this, this.targetConnection, false))) {
|
|
560
|
+
var child = this.isSuperior() ? this.targetBlock() : this.sourceBlock_;
|
|
561
|
+
child.unplug();
|
|
562
|
+
// Bump away.
|
|
563
|
+
this.sourceBlock_.bumpNeighbours();
|
|
564
|
+
}
|
|
565
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Namespace for block rendering functionality.
|
|
9
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The top level namespace for block rendering.
|
|
15
|
+
* @namespace Blockly.blockRendering
|
|
16
|
+
*/
|
|
17
|
+
goog.provide('Blockly.blockRendering');
|
|
18
|
+
|
|
19
|
+
goog.require('Blockly.registry');
|
|
20
|
+
goog.require('Blockly.utils.object');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Whether or not the debugger is turned on.
|
|
25
|
+
* @type {boolean}
|
|
26
|
+
* @package
|
|
27
|
+
*/
|
|
28
|
+
Blockly.blockRendering.useDebugger = false;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Registers a new renderer.
|
|
32
|
+
* @param {string} name The name of the renderer.
|
|
33
|
+
* @param {!Function} rendererClass The new renderer class
|
|
34
|
+
* to register.
|
|
35
|
+
* @throws {Error} if a renderer with the same name has already been registered.
|
|
36
|
+
*/
|
|
37
|
+
Blockly.blockRendering.register = function(name, rendererClass) {
|
|
38
|
+
Blockly.registry.register(Blockly.registry.Type.RENDERER, name,
|
|
39
|
+
rendererClass);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Unregisters the renderer registered with the given name.
|
|
44
|
+
* @param {string} name The name of the renderer.
|
|
45
|
+
*/
|
|
46
|
+
Blockly.blockRendering.unregister = function(name) {
|
|
47
|
+
Blockly.registry.unregister(Blockly.registry.Type.RENDERER, name);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Turn on the blocks debugger.
|
|
51
|
+
* @package
|
|
52
|
+
*/
|
|
53
|
+
Blockly.blockRendering.startDebugger = function() {
|
|
54
|
+
Blockly.blockRendering.useDebugger = true;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Turn off the blocks debugger.
|
|
59
|
+
* @package
|
|
60
|
+
*/
|
|
61
|
+
Blockly.blockRendering.stopDebugger = function() {
|
|
62
|
+
Blockly.blockRendering.useDebugger = false;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Initialize anything needed for rendering (constants, etc).
|
|
67
|
+
* @param {!string} name Name of the renderer to initialize.
|
|
68
|
+
* @param {!Blockly.Theme} theme The workspace theme object.
|
|
69
|
+
* @param {Object=} opt_rendererOverrides Rendering constant overrides.
|
|
70
|
+
* @return {!Blockly.blockRendering.Renderer} The new instance of a renderer.
|
|
71
|
+
* Already initialized.
|
|
72
|
+
* @package
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
Blockly.blockRendering.init = function(name, theme, opt_rendererOverrides) {
|
|
76
|
+
var rendererClass = Blockly.registry.getClass(
|
|
77
|
+
Blockly.registry.Type.RENDERER, name);
|
|
78
|
+
var renderer = new rendererClass(name);
|
|
79
|
+
renderer.init(theme, opt_rendererOverrides);
|
|
80
|
+
return renderer;
|
|
81
|
+
};
|