#44 Text font dropdown is broken

master
Agriya Dev5 2021-01-08 18:13:15 +05:30
parent 8616c834e4
commit 2757829dad
3 changed files with 13 additions and 14 deletions

View File

@ -4,16 +4,13 @@ import 'elix/define/DropdownList.js';
const template = document.createElement('template'); const template = document.createElement('template');
template.innerHTML = ` template.innerHTML = `
<style> <style>
[part~="source"] { ::part(popup-toggle) {
grid-template-columns: 20px 1fr auto; display: none;
} }
::slotted(*) { ::slotted(*) {
background: #E8E8E8; background: #E8E8E8;
border: 1px solid #B0B0B0; border: 1px solid #B0B0B0;
} }
::part(popup-toggle) {
display: none;
}
</style> </style>
<label>Label</label> <label>Label</label>
<elix-dropdown-list> <elix-dropdown-list>

View File

@ -21,7 +21,9 @@ export class SeListItem extends HTMLElement {
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.append(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$menuitem = this._shadowRoot.querySelector('elix-menu-item'); this.$menuitem = this._shadowRoot.querySelector('elix-option');
this.$svg = this.$menuitem.shadowRoot.querySelector('#checkmark');
this.$svg.setAttribute('style', 'display: none;');
} }
/** /**
* @function observedAttributes * @function observedAttributes

View File

@ -248,14 +248,14 @@
<se-button id="tool_text_anchor_end" title="Align the text from end" src="./images/anchor_end.svg"></se-button> <se-button id="tool_text_anchor_end" title="Align the text from end" src="./images/anchor_end.svg"></se-button>
</div> </div>
<se-list id="tool_font_family" label="Font:"> <se-list id="tool_font_family" label="Font:">
<se-list-item value="Sans-serif"> <div style="font-family:serif">Sans-serif</div></se-list-item> <se-list-item value="Sans-serif" style="font-family:serif;"> Sans-serif</se-list-item>
<se-list-item value="Serif"> <div style="font-family:serif">Serif</div></se-list-item> <se-list-item value="Serif" style="font-family:sans-serif;"> Serif</se-list-item>
<se-list-item value="Cursive"> <div style="font-family:serif">Cursive</div></se-list-item> <se-list-item value="Cursive" style="font-family:cursive;"> Cursive</se-list-item>
<se-list-item value="Fantasy"> <div style="font-family:serif">Fantasy</div></se-list-item> <se-list-item value="Fantasy" style="font-family:fantasy;"> Fantasy</se-list-item>
<se-list-item value="Monospace"> <div style="font-family:serif">Monospace</div></se-list-item> <se-list-item value="Monospace" style="font-family:monospace;"> Monospace</se-list-item>
<se-list-item value="Courier"> <div style="font-family:serif">Courier</div></se-list-item> <se-list-item value="Courier" style="font-family:courier;"> Courier</se-list-item>
<se-list-item value="Helvetica"> <div style="font-family:serif">Helvetica</div></se-list-item> <se-list-item value="Helvetica" style="font-family:helvetica;">Helvetica</se-list-item>
<se-list-item value="Times"> <div style="font-family:serif">Times</div></se-list-item> <se-list-item value="Times" style="font-family:times;">Times</se-list-item>
</se-list> </se-list>
<se-spin-input size="2" id="font_size" min=1 max=1000 step=1 title="Change Font Size" <se-spin-input size="2" id="font_size" min=1 max=1000 step=1 title="Change Font Size"
src="./images/fontsize.svg"></se-spin-input> src="./images/fontsize.svg"></se-spin-input>