mirror of
https://github.com/dfpc-coe/CloudTAK.git
synced 2025-12-22 05:37:16 +00:00
Setup Radial
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user