From 6650ecf13f4196e8aeb495e2d8d0f7e82d4bd0b1 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 26 Sep 2019 10:57:36 -0700 Subject: [PATCH] Make dynamic variables be an optional module. Also straighten out some dependencies. --- core/bubble.js | 1 + core/inject.js | 1 + core/requires.js | 2 ++ core/trashcan.js | 1 + core/variables_dynamic.js | 2 +- core/workspace_svg.js | 4 ---- core/zoom_controls.js | 1 + 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/bubble.js b/core/bubble.js index 3785cb176..ad7e95e7e 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -26,6 +26,7 @@ goog.provide('Blockly.Bubble'); +goog.require('Blockly.Scrollbar'); goog.require('Blockly.Touch'); goog.require('Blockly.utils'); goog.require('Blockly.utils.Coordinate'); diff --git a/core/inject.js b/core/inject.js index 3a03d797d..bd9bc0823 100644 --- a/core/inject.js +++ b/core/inject.js @@ -33,6 +33,7 @@ goog.require('Blockly.DropDownDiv'); goog.require('Blockly.Events'); goog.require('Blockly.Grid'); goog.require('Blockly.Options'); +goog.require('Blockly.ScrollbarPair'); goog.require('Blockly.Tooltip'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); diff --git a/core/requires.js b/core/requires.js index b3030e2d9..298f99948 100644 --- a/core/requires.js +++ b/core/requires.js @@ -51,6 +51,8 @@ goog.require('Blockly.Toolbox'); // If a trashcan on the workspace isn't required, then Blockly.inject's // "trashcan" configuration must be false. goog.require('Blockly.Trashcan'); +// Only needed if one is using the 'VARIABLE_DYNAMIC' typed variables category. +goog.require('Blockly.VariablesDynamic'); // If zoom controls aren't required, then Blockly.inject's // "zoom"/"controls" configuration must be false. goog.require('Blockly.ZoomControls'); diff --git a/core/trashcan.js b/core/trashcan.js index 3c2ce193e..521f9af25 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -26,6 +26,7 @@ goog.provide('Blockly.Trashcan'); +goog.require('Blockly.Scrollbar'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.Rect'); goog.require('Blockly.Xml'); diff --git a/core/variables_dynamic.js b/core/variables_dynamic.js index f128341d5..a2c006b00 100644 --- a/core/variables_dynamic.js +++ b/core/variables_dynamic.js @@ -19,7 +19,7 @@ */ /** - * @fileoverview Utility functions for handling variables dynamic. + * @fileoverview Utility functions for handling typed variables. * * @author duzc2dtw@gmail.com (Du Tian Wei) */ diff --git a/core/workspace_svg.js b/core/workspace_svg.js index f57caa5f3..aa9ce8184 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -31,22 +31,18 @@ goog.provide('Blockly.WorkspaceSvg'); goog.require('Blockly.blockRendering'); goog.require('Blockly.ConnectionDB'); goog.require('Blockly.constants'); -goog.require('Blockly.CursorSvg'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockCreate'); goog.require('Blockly.Gesture'); goog.require('Blockly.Grid'); goog.require('Blockly.Msg'); goog.require('Blockly.Options'); -goog.require('Blockly.ScrollbarPair'); -goog.require('Blockly.Touch'); goog.require('Blockly.TouchGesture'); goog.require('Blockly.utils'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.object'); goog.require('Blockly.utils.Rect'); -goog.require('Blockly.VariablesDynamic'); goog.require('Blockly.Workspace'); goog.require('Blockly.WorkspaceAudio'); goog.require('Blockly.WorkspaceComment'); diff --git a/core/zoom_controls.js b/core/zoom_controls.js index d30044d69..dcf50e792 100644 --- a/core/zoom_controls.js +++ b/core/zoom_controls.js @@ -27,6 +27,7 @@ goog.provide('Blockly.ZoomControls'); goog.require('Blockly.Css'); +goog.require('Blockly.Scrollbar'); goog.require('Blockly.Touch'); goog.require('Blockly.utils.dom');