Avoid creating comboboxes

(closes #5568)

Several strategies in here:
- Move uiCombobox() from inside the render function to class variable
- Don't render stuff like the raw tag editor when it's collapsed
- Don't show as many fields/combos on hover
- Don't instantiate fields (like universal/more) until they're actually shown
- Bind the combo on enter selection not on update selection
This commit is contained in:
Bryan Housel
2018-12-11 16:07:00 -05:00
parent 222b3f1b04
commit 39b3f1df68
16 changed files with 135 additions and 115 deletions
+6 -6
View File
@@ -33,10 +33,10 @@ export function uiEntityEditor(context) {
var _activePreset;
var _tagReference;
var presetEditor = uiPresetEditor(context)
.on('change', changeTags);
var rawTagEditor = uiRawTagEditor(context)
.on('change', changeTags);
var presetEditor = uiPresetEditor(context).on('change', changeTags);
var rawTagEditor = uiRawTagEditor(context).on('change', changeTags);
var rawMemberEditor = uiRawMemberEditor(context);
var rawMembershipEditor = uiRawMembershipEditor(context);
function entityEditor(selection) {
@@ -178,7 +178,7 @@ export function uiEntityEditor(context) {
if (entity.type === 'relation') {
body.select('.raw-member-editor')
.style('display', 'block')
.call(uiRawMemberEditor(context)
.call(rawMemberEditor
.entityID(_entityID)
);
} else {
@@ -187,7 +187,7 @@ export function uiEntityEditor(context) {
}
body.select('.raw-membership-editor')
.call(uiRawMembershipEditor(context)
.call(rawMembershipEditor
.entityID(_entityID)
);