Skip to content

Commit

Permalink
wip: add titles to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-d committed Dec 2, 2023
1 parent 67edfdb commit 8ca9a8f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
18 changes: 17 additions & 1 deletion oscd-designer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ export default class Designer extends LitElement {
eqType => html`<mwc-fab
mini
label="Add ${eqType}"
title="Add ${eqType}"
@click=${() => {
const element =
this.templateElements.ConductingEquipment!.cloneNode() as Element;
Expand All @@ -746,12 +747,14 @@ export default class Designer extends LitElement {
this.startPlacing(element);
}}
label="Add Bus Bar"
title="Add Bus Bar"
style="--mdc-theme-secondary: #fff; --mdc-theme-on-secondary: rgb(0, 0, 0 / 0.83)"
>
</mwc-fab
><mwc-fab
mini
label="Add Bay"
title="Add Bay"
@click=${() => {
const element =
this.templateElements.Bay!.cloneNode() as Element;
Expand All @@ -769,6 +772,7 @@ export default class Designer extends LitElement {
? html`<mwc-fab
mini
label="Add VoltageLevel"
title="Add VoltageLevel"
@click=${() => {
const element =
this.templateElements.VoltageLevel!.cloneNode() as Element;
Expand All @@ -784,6 +788,7 @@ export default class Designer extends LitElement {
icon="margin"
@click=${() => this.insertSubstation()}
label="Add Substation"
title="Add Substation"
style="--mdc-theme-secondary: #BB1326;"
>
</mwc-fab
Expand All @@ -794,6 +799,7 @@ export default class Designer extends LitElement {
? html`<mwc-fab
mini
label="Add Single Winding Auto Transformer"
title="Add Single Winding Auto Transformer"
@click=${() => {
const element =
this.templateElements.PowerTransformer!.cloneNode() as Element;
Expand All @@ -811,6 +817,7 @@ export default class Designer extends LitElement {
><mwc-fab
mini
label="Add Two Winding Auto Transformer"
title="Add Two Winding Auto Transformer"
@click=${() => {
const element =
this.templateElements.PowerTransformer!.cloneNode() as Element;
Expand All @@ -833,6 +840,7 @@ export default class Designer extends LitElement {
><mwc-fab
mini
label="Add Two Winding Transformer"
title="Add Two Winding Transformer"
@click=${() => {
const element =
this.templateElements.PowerTransformer!.cloneNode() as Element;
Expand All @@ -853,6 +861,7 @@ export default class Designer extends LitElement {
><mwc-fab
mini
label="Add Three Winding Transformer"
title="Add Three Winding Transformer"
@click=${() => {
const element =
this.templateElements.PowerTransformer!.cloneNode() as Element;
Expand All @@ -873,6 +882,7 @@ export default class Designer extends LitElement {
><mwc-fab
mini
label="Add Single Winding Earthing Transformer"
title="Add Single Winding Earthing Transformer"
@click=${() => {
const element =
this.templateElements.PowerTransformer!.cloneNode() as Element;
Expand All @@ -890,6 +900,7 @@ export default class Designer extends LitElement {
><mwc-fab
mini
label="Add Two Winding Earthing Transformer"
title="Add Two Winding Earthing Transformer"
@click=${() => {
const element =
this.templateElements.PowerTransformer!.cloneNode() as Element;
Expand All @@ -915,6 +926,8 @@ export default class Designer extends LitElement {
this.doc.querySelector('VoltageLevel, PowerTransformer')
? html`<mwc-icon-button-toggle
id="labels"
label="Toggle Labels"
title="Toggle Labels"
on
onIcon="font_download"
offIcon="font_download_off"
Expand All @@ -926,12 +939,14 @@ export default class Designer extends LitElement {
? html`<mwc-icon-button
icon="zoom_in"
label="Zoom In"
title="Zoom In"
@click=${() => this.zoomIn()}
>
</mwc-icon-button
><mwc-icon-button
icon="zoom_out"
label="Zoom Out"
title="Zoom Out"
@click=${() => this.zoomOut()}
></mwc-icon-button>`
: nothing
Expand All @@ -945,7 +960,8 @@ export default class Designer extends LitElement {
this.placingLabel
? html`<mwc-icon-button
icon="close"
label="Cancel action"
label="Cancel"
title="Cancel"
@click=${() => this.reset()}
>
</mwc-icon-button>`
Expand Down
6 changes: 5 additions & 1 deletion sld-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1420,13 +1420,15 @@ export class SLDEditor extends LitElement {
${this.substation.getAttribute('name')}
<mwc-icon-button
label="Edit Substation"
title="Edit Substation"
@click=${() =>
this.dispatchEvent(newEditWizardEvent(this.substation))}
icon="edit"
>
</mwc-icon-button>
<mwc-icon-button
label="Resize Substation"
title="Resize Substation"
@click=${() => this.resizeSubstationUI.show()}
>
<svg
Expand All @@ -1441,13 +1443,15 @@ export class SLDEditor extends LitElement {
</mwc-icon-button>
<mwc-icon-button
label="Delete Substation"
title="Delete Substation"
@click=${() =>
this.dispatchEvent(newEditEvent({ node: this.substation }))}
icon="delete"
>
</mwc-icon-button>
<mwc-icon-button
label="Export Single Line Diagram"
label="Export Single Line Diagram SVG"
title="Export Single Line Diagram SVG"
@click=${() => this.saveSVG()}
icon="file_download"
>
Expand Down

0 comments on commit 8ca9a8f

Please sign in to comment.