diff --git a/packages/html/stories/Guides.stories.js b/packages/html/stories/Guides.stories.js
index 7c0f7190a..de0d5a0c6 100644
--- a/packages/html/stories/Guides.stories.js
+++ b/packages/html/stories/Guides.stories.js
@@ -18,8 +18,7 @@ limitations under the License.
import {
Graph,
SelectionHandler,
- InternalEvent,
- constants,
+ eventUtils,
EdgeHandler,
EdgeStyle,
RubberBandHandler,
@@ -47,12 +46,9 @@ const Template = ({ label, ...args }) => {
container.style.background = 'url(/images/grid.gif)';
container.style.cursor = 'default';
- // Enables guides
- SelectionHandler.prototype.guidesEnabled = true;
-
// Alt disables guides
SelectionHandler.prototype.useGuidesForEvent = function (me) {
- return !InternalEvent.isAltDown(me.getEvent());
+ return !eventUtils.isAltDown(me.getEvent());
};
// Defines the guides to be red (default)
@@ -69,6 +65,11 @@ const Template = ({ label, ...args }) => {
graph.setConnectable(true);
graph.gridSize = 30;
+ // Enables guides
+ const selectionHandler = graph.getPlugin('SelectionHandler');
+ if (selectionHandler)
+ selectionHandler.guidesEnabled = true;
+
// Changes the default style for edges "in-place" and assigns
// an alternate edge style which is applied in Graph.flip
// when the user double clicks on the adjustment control point