From 57ba6a98629e3e48b6cbda20e14f24844cfe2896 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 18 Dec 2017 00:11:08 -0500 Subject: [PATCH] Add selectedIDs() for modeMove and modeRotate This allows the label collision boxes for the vertices to update during these modes. Otherwise the labels.js `isInterestingVertex()` function doesn't consider them interesting enough to update. --- modules/modes/move.js | 7 +++++++ modules/modes/rotate.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/modules/modes/move.js b/modules/modes/move.js index a6571d332..b9ce5b7b3 100644 --- a/modules/modes/move.js +++ b/modules/modes/move.js @@ -192,5 +192,12 @@ export function modeMove(context, entityIDs, baseGraph) { }; + mode.selectedIDs = function() { + if (!arguments.length) return entityIDs; + // no assign + return mode; + }; + + return mode; } diff --git a/modules/modes/rotate.js b/modules/modes/rotate.js index 4efd701dd..6448d5333 100644 --- a/modules/modes/rotate.js +++ b/modules/modes/rotate.js @@ -155,5 +155,12 @@ export function modeRotate(context, entityIDs) { }; + mode.selectedIDs = function() { + if (!arguments.length) return entityIDs; + // no assign + return mode; + }; + + return mode; }