Update data-menu-position to be space separated instead of comma separated (#1286)

This commit is contained in:
toasted-nutbread 2021-01-21 19:57:43 -05:00 committed by GitHub
parent ad0002d4d8
commit 0bc5a4a971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View File

@ -1883,7 +1883,7 @@
<div class="profile-entry-cell"><label class="radio"><input type="radio" class="profile-entry-is-default-radio" name="profile-entry-default-radio"><span class="radio-body"><span class="radio-border"></span><span class="radio-dot"></span></span></label></div> <div class="profile-entry-cell"><label class="radio"><input type="radio" class="profile-entry-is-default-radio" name="profile-entry-default-radio"><span class="radio-body"><span class="radio-border"></span><span class="radio-dot"></span></span></label></div>
<div class="profile-entry-cell"><input class="profile-entry-name-input" type="text" autocomplete="off" placeholder="Profile name"></div> <div class="profile-entry-cell"><input class="profile-entry-name-input" type="text" autocomplete="off" placeholder="Profile name"></div>
<div class="profile-entry-cell"><a class="profile-entry-condition-count-link"><span class="profile-entry-condition-count">0</span></a></div> <div class="profile-entry-cell"><a class="profile-entry-condition-count-link"><span class="profile-entry-condition-count">0</span></a></div>
<div class="profile-entry-cell input-height-icon-button-container"><button class="icon-button profile-entry-menu-button" data-menu="profile-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button></div> <div class="profile-entry-cell input-height-icon-button-container"><button class="icon-button profile-entry-menu-button" data-menu="profile-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button></div>
</div></template> </div></template>
<template id="profile-condition-group-template"><div class="profile-condition-group"> <template id="profile-condition-group-template"><div class="profile-condition-group">
@ -1908,7 +1908,7 @@
</div> </div>
</div> </div>
<div class="profile-condition-menu-button-container input-height-icon-button-container"> <div class="profile-condition-menu-button-container input-height-icon-button-container">
<button class="icon-button profile-condition-menu-button" data-menu="profile-condition-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button profile-condition-menu-button" data-menu="profile-condition-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</div> </div>
</div></template> </div></template>
@ -2053,7 +2053,7 @@
</div> </div>
</div> </div>
<div class="settings-item-right"> <div class="settings-item-right">
<button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</div> </div>
</div> </div>
<div class="settings-item-children"> <div class="settings-item-children">
@ -2268,7 +2268,7 @@
<option value="custom">Custom</option> <option value="custom">Custom</option>
</select> </select>
<div class="horizontal-flex-fill"></div> <div class="horizontal-flex-fill"></div>
<button class="icon-button audio-source-menu-button" data-menu="audio-source-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button audio-source-menu-button" data-menu="audio-source-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</div></template> </div></template>
<template id="audio-source-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"> <template id="audio-source-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu">
@ -2340,7 +2340,7 @@
<div class="scan-input-index-cell generic-list-index-prefix"></div> <div class="scan-input-index-cell generic-list-index-prefix"></div>
<div class="scan-input-suffix-cell"> <div class="scan-input-suffix-cell">
<div class="input-height-icon-button-container"> <div class="input-height-icon-button-container">
<button class="icon-button scanning-input-menu-button" data-menu="scanning-inputs-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button scanning-input-menu-button" data-menu="scanning-inputs-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</div> </div>
</div> </div>
@ -2673,7 +2673,7 @@
<template id="anki-card-field-template"><div class="anki-card-field-name-container"><span class="anki-card-field-name"></span></div> <template id="anki-card-field-template"><div class="anki-card-field-name-container"><span class="anki-card-field-name"></span></div>
<div class="anki-card-field-value-container"> <div class="anki-card-field-value-container">
<input type="text" class="anki-card-field-value input-with-suffix-button" autocomplete="off"> <input type="text" class="anki-card-field-value input-with-suffix-button" autocomplete="off">
<button class="anki-card-field-value-menu-button input-suffix-button input-suffix-icon-button" data-menu-position="below,left"><span class="icon icon-button-icon-light" data-icon="material-down-arrow"></span></button> <button class="anki-card-field-value-menu-button input-suffix-button input-suffix-icon-button" data-menu-position="below left"><span class="icon icon-button-icon-light" data-icon="material-down-arrow"></span></button>
</div></template> </div></template>
<template id="anki-card-terms-field-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"></div></div></template> <template id="anki-card-terms-field-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"></div></div></template>
@ -2710,7 +2710,7 @@
<input type="text" id="anki-card-templates-test-text-input" class="form-control" value="読め" placeholder="Preview text" autocomplete="off"> <input type="text" id="anki-card-templates-test-text-input" class="form-control" value="読め" placeholder="Preview text" autocomplete="off">
<div class="anki-card-templates-test-input-container"> <div class="anki-card-templates-test-input-container">
<input type="text" class="input-with-suffix-button" id="anki-card-templates-test-field-input" value="{expression}" placeholder="{marker}" autocomplete="off" spellcheck="false"> <input type="text" class="input-with-suffix-button" id="anki-card-templates-test-field-input" value="{expression}" placeholder="{marker}" autocomplete="off" spellcheck="false">
<button class="input-suffix-button input-suffix-icon-button" id="anki-card-templates-test-field-menu-button" data-menu="anki-card-all-field-menu" data-menu-position="below,left"><span class="icon icon-button-icon-light" data-icon="material-down-arrow"></span></button> <button class="input-suffix-button input-suffix-icon-button" id="anki-card-templates-test-field-menu-button" data-menu="anki-card-all-field-menu" data-menu-position="below left"><span class="icon icon-button-icon-light" data-icon="material-down-arrow"></span></button>
</div> </div>
<button id="anki-card-templates-test-render-button">Test</button> <button id="anki-card-templates-test-render-button">Test</button>
</div> </div>
@ -2859,7 +2859,7 @@
<div class="translation-text-replacement-replacement-container"> <div class="translation-text-replacement-replacement-container">
<input type="text" class="translation-text-replacement-replacement code"> <input type="text" class="translation-text-replacement-replacement code">
</div> </div>
<button class="icon-button translation-text-replacement-button" data-menu="translation-text-replacement-entry-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button translation-text-replacement-button" data-menu="translation-text-replacement-entry-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
<div class="translation-text-replacement-test-label translation-text-replacement-test-node">Test Input:</div> <div class="translation-text-replacement-test-label translation-text-replacement-test-node">Test Input:</div>
<div class="translation-text-replacement-test-container translation-text-replacement-test-node"> <div class="translation-text-replacement-test-container translation-text-replacement-test-node">
@ -2947,7 +2947,7 @@
</div> </div>
</td> </td>
<td> <td>
<button class="icon-button sentence-termination-character-entry-button" data-menu="sentence-termination-character-entry-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button sentence-termination-character-entry-button" data-menu="sentence-termination-character-entry-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</td> </td>
</tr></template> </tr></template>
@ -2985,7 +2985,7 @@
<div class="hotkey-list-item-index-cell generic-list-index-prefix"></div> <div class="hotkey-list-item-index-cell generic-list-index-prefix"></div>
<div class="hotkey-list-item-button-cell"> <div class="hotkey-list-item-button-cell">
<div class="input-height-icon-button-container"> <div class="input-height-icon-button-container">
<button class="icon-button hotkey-list-item-button" data-menu="hotkey-list-item-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button hotkey-list-item-button" data-menu="hotkey-list-item-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</div> </div>
</div> </div>

View File

@ -322,7 +322,7 @@
</div> </div>
</div> </div>
<div class="settings-item-right"> <div class="settings-item-right">
<button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below,left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button> <button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
</div> </div>
</div> </div>
</div></template> </div></template>

View File

@ -92,7 +92,7 @@ class PopupMenu extends EventDispatcher {
let verticalCover = 1; let verticalCover = 1;
const positionInfo = this._sourceElement.dataset.menuPosition; const positionInfo = this._sourceElement.dataset.menuPosition;
if (typeof positionInfo === 'string') { if (typeof positionInfo === 'string') {
const positionInfoSet = new Set(positionInfo.split(',')); const positionInfoSet = new Set(positionInfo.split(' '));
if (positionInfoSet.has('left')) { if (positionInfoSet.has('left')) {
horizontal = -1; horizontal = -1;