Setup Radial

This commit is contained in:
ingalls
2025-12-15 22:32:47 -07:00
parent c46c71e7da
commit ba2bd0fc00
2 changed files with 8 additions and 1 deletions

View File

@@ -327,6 +327,7 @@ RadialMenu.prototype.createUseTag = function (x, y, link) {
use.setAttribute('height', '10');
use.setAttribute('fill', 'white');
use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', link);
use.setAttribute('href', link);
return use;
};

View File

@@ -1,5 +1,6 @@
<template>
<svg
ref='icons'
id='icons'
class='d-none'
>
@@ -115,7 +116,7 @@
</template>
<script setup>
import { ref, shallowRef, onMounted, onUnmounted, nextTick } from 'vue';
import { ref, shallowRef, onMounted, onUnmounted, nextTick, useTemplateRef } from 'vue';
import { OriginMode } from '../../../base/cot.ts';
import Subscription from '../../../base/subscription.ts';
import RadialMenu from './RadialMenu.js';
@@ -134,6 +135,7 @@ const props = defineProps({
const emit = defineEmits(['close', 'click']);
const iconsRef = useTemplateRef('icons');
const menuItems = ref([]);
const menu = shallowRef();
const popup = shallowRef();
@@ -155,6 +157,10 @@ onMounted(async () => {
container.style.width = `${props.size}px`;
container.style.height = `${props.size}px`;
if (iconsRef.value) {
container.appendChild(iconsRef.value.cloneNode(true));
}
menu.value = new RadialMenu({
parent: container,
size: props.size,