mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
refactor(ui): own Display control subscriptions and cleanup
This commit is contained in:
1 parent
795ed68192
commit
ffc65dd844
11 files changed
+307
-166
No files matched your search
@@ -246,7 +246,9 @@ test('detection-on-by-default is a default, not an operator override', () => {
|
||||
// preset consults the flag, and the detection button sets it.
|
||||
assert.match(uiSource, /if \(preset\.detection && !this\._detectionUserOverridden\) \{/,
|
||||
'a style preset still yields to an operator who changed detection by hand');
|
||||
const detectionButton = uiBlock("this._detectionBtn.addEventListener('click'", 'cycleDetectionMode()');
|
||||
const displayActions = uiSource.slice(uiSource.indexOf('this._displayControls ='));
|
||||
const detectionButton = displayActions.slice(displayActions.indexOf('cycleDetection:'), displayActions.indexOf('toggleModels:'));
|
||||
assert.match(detectionButton, /cycleDetectionMode\(\)/, 'the button still invokes the detection action');
|
||||
assert.match(detectionButton, /this\._detectionUserOverridden = true;/,
|
||||
'and the detection control still claims the override when the operator uses it');
|
||||
|
||||
|
||||
Reference in new issue
Block a user