generated from Nodarx/template
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de9614fdb6 | |||
| d619693460 | |||
| 631c35a00a |
+7
-12
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace KTXM\MediaViewer;
|
||||
|
||||
use KTXF\Module\ModuleBrowserInterface;
|
||||
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
||||
use KTXF\Module\Configuration\ModuleContextInterface;
|
||||
use KTXF\Module\ModuleInstanceAbstract;
|
||||
|
||||
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
|
||||
class Module extends ModuleInstanceAbstract
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
@@ -41,16 +42,10 @@ class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function registerBI(): array
|
||||
public function configure(ModuleContextInterface $context): void
|
||||
{
|
||||
return [
|
||||
'handle' => $this->handle(),
|
||||
'namespace' => 'MediaViewer',
|
||||
'version' => $this->version(),
|
||||
'label' => $this->label(),
|
||||
'author' => $this->author(),
|
||||
'description' => $this->description(),
|
||||
'boot' => 'static/module.mjs',
|
||||
];
|
||||
if ($context instanceof BrowserModuleContextInterface) {
|
||||
$context->registerModule($this, 'MediaViewer', 'static/module.mjs');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
import type { MediaLeafProps } from '@/types'
|
||||
|
||||
const props = defineProps<MediaLeafProps>()
|
||||
const emit = defineEmits<{ error: [] }>()
|
||||
|
||||
// ── Pan / zoom state ────────────────────────────────────────────────────────
|
||||
|
||||
@@ -103,6 +104,7 @@ onUnmounted(() => {
|
||||
transformOrigin: 'center center',
|
||||
}"
|
||||
draggable="false"
|
||||
@error="emit('error')"
|
||||
/>
|
||||
|
||||
<!-- Zoom hint -->
|
||||
|
||||
@@ -82,6 +82,7 @@ defineExpose({
|
||||
:item="item"
|
||||
:presentation="presentation"
|
||||
class="media-stage__viewer"
|
||||
@error="error = true; url = ''"
|
||||
/>
|
||||
</template>
|
||||
<template #fallback>
|
||||
|
||||
Reference in New Issue
Block a user