From 055e66b2b86b8c6651bcb9a4f850291f94588570 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Tue, 10 Sep 2024 11:22:19 +0200 Subject: [PATCH] fix: added preview link to structure image --- app/Livewire/MoleculeDepict2d.php | 6 ++++++ .../views/livewire/molecule-depict2d.blade.php | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/app/Livewire/MoleculeDepict2d.php b/app/Livewire/MoleculeDepict2d.php index aa2d4868..71dd406b 100644 --- a/app/Livewire/MoleculeDepict2d.php +++ b/app/Livewire/MoleculeDepict2d.php @@ -27,6 +27,12 @@ public function source() return env('CM_API').'depict/2D?smiles='.urlencode($this->smiles).'&height='.$this->height.'&width='.$this->width; } + #[Computed] + public function preview() + { + return env('CM_API').'depict/2D?smiles='.urlencode($this->smiles); + } + public function render() { return view('livewire.molecule-depict2d'); diff --git a/resources/views/livewire/molecule-depict2d.blade.php b/resources/views/livewire/molecule-depict2d.blade.php index a83377a1..f1637040 100644 --- a/resources/views/livewire/molecule-depict2d.blade.php +++ b/resources/views/livewire/molecule-depict2d.blade.php @@ -35,6 +35,19 @@ class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> +