From 9112fbfe0983ecc092e89d595a44e313acf4cfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 3 Dec 2024 17:02:29 +0100 Subject: [PATCH] Add missing selection tool --- contribs/gmf/apps/desktop_alt/index.html.ejs | 2 +- src/canvas/ToolButtonsImplElements.ts | 33 +++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/contribs/gmf/apps/desktop_alt/index.html.ejs b/contribs/gmf/apps/desktop_alt/index.html.ejs index 755d4368c9e1..eb84568f8645 100644 --- a/contribs/gmf/apps/desktop_alt/index.html.ejs +++ b/contribs/gmf/apps/desktop_alt/index.html.ejs @@ -232,7 +232,7 @@ -
+
{{ 'Selection' | translate }} diff --git a/src/canvas/ToolButtonsImplElements.ts b/src/canvas/ToolButtonsImplElements.ts index 3ce897008bd5..4e00ff5a674a 100644 --- a/src/canvas/ToolButtonsImplElements.ts +++ b/src/canvas/ToolButtonsImplElements.ts @@ -19,7 +19,7 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import {TemplateResult, html} from 'lit'; +import {TemplateResult, html, css} from 'lit'; import {customElement} from 'lit/decorators.js'; import ToolButtonElement from 'gmfapi/elements/ToolButtonElement'; import i18next from 'i18next'; @@ -252,3 +252,34 @@ export class ToolButtonRouting extends ToolButtonElement { `; } } + +@customElement('gmf-selection-button') +export class ToolButtonSelection extends ToolButtonElement { + static styles = [ + ...ToolButtonElement.styles, + css` + .offset-info-icon { + position: absolute; + line-height: normal; + } + `, + ]; + constructor() { + super('selection'); + } + + render(): TemplateResult { + return html` + + `; + } +}