Favorite preset

This commit is contained in:
Brian Hatchl
2019-02-20 15:23:58 -05:00
committed by GitHub
parent d84e945330
commit 1faa6ad839
16 changed files with 193 additions and 33 deletions
+8
View File
@@ -14,6 +14,7 @@ import { tooltip } from '../util/tooltip';
import { actionChangeTags } from '../actions';
import { modeBrowse } from '../modes';
import { svgIcon } from '../svg';
import { uiPresetFavorite } from './preset_favorite';
import { uiPresetIcon } from './preset_icon';
import { uiQuickLinks } from './quick_links';
import { uiRawMemberEditor } from './raw_member_editor';
@@ -35,6 +36,7 @@ export function uiEntityEditor(context) {
var _entityID;
var _activePreset;
var _tagReference;
var _presetFavorite;
var entityIssues = uiEntityIssues(context);
var quickLinks = uiQuickLinks();
@@ -137,6 +139,11 @@ export function uiEntityEditor(context) {
body = body
.merge(bodyEnter);
if (_presetFavorite) {
body.selectAll('.preset-list-button-wrap')
.call(_presetFavorite.button);
}
// update header
if (_tagReference) {
body.selectAll('.preset-list-button-wrap')
@@ -333,6 +340,7 @@ export function uiEntityEditor(context) {
_activePreset = val;
_tagReference = uiTagReference(_activePreset.reference(context.geometry(_entityID)), context)
.showing(false);
_presetFavorite = uiPresetFavorite(_activePreset, context.geometry(_entityID), context);
}
return entityEditor;
};