From cafafc4175d35f149e1ca5d2fd073dc888c09188 Mon Sep 17 00:00:00 2001 From: Jonas Weigert Date: Sat, 16 Dec 2023 11:26:30 -0800 Subject: [PATCH] feat(editor): added labels with animation support inputs are not yet styled and thus not ready for release --- app/Actions/FontAwesome/v6/GetLabelMarkup.php | 6 +- resources/views/components/editor.blade.php | 33 +++++++- .../editor/input-color-select.blade.php | 81 ++++++------------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/app/Actions/FontAwesome/v6/GetLabelMarkup.php b/app/Actions/FontAwesome/v6/GetLabelMarkup.php index 343a4be..00d7bb4 100644 --- a/app/Actions/FontAwesome/v6/GetLabelMarkup.php +++ b/app/Actions/FontAwesome/v6/GetLabelMarkup.php @@ -14,9 +14,9 @@ public function handle(Request $request, int $markerSize) // GET LABEL $labelText = $request->get('label'); $labelTextSize = $markerSize / 5; - $labelColor = $request->get('lc', '#D9534F'); + $labelColor = '#'.$request->get('lc', 'D9534F'); $labelFont = $request->get('lf', 'Arial'); - $labelFontColor = $request->get('lfc', '#FFF'); + $labelFontColor = '#'.$request->get('lfc', 'FFF'); // LABEL ANIMATION $labelAnimation = $request->get('labelAnimation', null); @@ -73,7 +73,7 @@ public function handle(Request $request, int $markerSize) // GENERATE LABEL MARKUP $labelMarkup = ''; - if ($labelText) { + if ($request->has('label')) { $labelMarkup = << diff --git a/resources/views/components/editor.blade.php b/resources/views/components/editor.blade.php index eb8abb6..e0daa3b 100644 --- a/resources/views/components/editor.blade.php +++ b/resources/views/components/editor.blade.php @@ -2,6 +2,7 @@
@@ -45,6 +46,15 @@
{{-- @todo: implement this --}}
+ + {{-- LABEL --}} + + + +
@@ -61,13 +71,32 @@