added hidePromotedAttributes label, fixes #221

This commit is contained in:
azivner 2018-11-13 22:14:41 +01:00
parent 83c6f86d26
commit abbade96af
3 changed files with 7 additions and 5 deletions

View File

@ -26,7 +26,8 @@ async function getAttributes() {
async function showAttributes() {
$promotedAttributesContainer.empty();
$attributeList.hide().empty();
$attributeList.hide();
$attributeListInner.empty();
const note = noteDetailService.getCurrentNote();
@ -37,7 +38,9 @@ async function showAttributes() {
&& !attr.name.startsWith("child:")
&& attr.value.isPromoted);
if (promoted.length > 0) {
const hidePromotedAttributes = attributes.some(attr => attr.type === 'label' && attr.name === 'hidePromotedAttributes');
if (promoted.length > 0 && !hidePromotedAttributes) {
const $tbody = $("<tbody>");
for (const definitionAttr of promoted) {

View File

@ -528,9 +528,7 @@ $centerButton.click(() => {
let averageX = totalX / mapData.notes.length;
let averageY = totalY / mapData.notes.length;
console.log(averageX, averageY);
//pzInstance.moveTo(averageX, averageY);
pzInstance.moveTo(averageX, averageY);
});
$component.on("drop", dropNoteOntoRelationMapHandler);

View File

@ -16,6 +16,7 @@ const BUILTIN_ATTRIBUTES = [
{ type: 'label', name: 'disableInclusion' },
{ type: 'label', name: 'appCss' },
{ type: 'label', name: 'hideChildrenOverview' },
{ type: 'label', name: 'hidePromotedAttributes' },
// relation names
{ type: 'relation', name: 'runOnNoteView' },