37 changed files with 714 additions and 9 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,49 @@ |
|||
<template> |
|||
<q-menu ref="contextMenuRef" context-menu> |
|||
<q-list dense style="min-width: 100px"> |
|||
<q-item v-close-popup clickable @click="remove"> |
|||
<q-item-section>{{ $t('copy') }}</q-item-section> |
|||
</q-item> |
|||
<q-item v-close-popup clickable @click="remove"> |
|||
<q-item-section>{{ $t('paste') }}</q-item-section> |
|||
</q-item> |
|||
<q-item v-close-popup clickable @click="remove"> |
|||
<q-item-section>{{ $t('cut') }}</q-item-section> |
|||
</q-item> |
|||
<q-item v-close-popup clickable @click="remove"> |
|||
<q-item-section>{{ $t('delete') }}</q-item-section> |
|||
</q-item> |
|||
</q-list> |
|||
</q-menu> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue'; |
|||
|
|||
const contextMenuRef = ref(); |
|||
let targetElement = null; |
|||
|
|||
const show = (element) => { |
|||
targetElement = element; |
|||
contextMenuRef.value.show(); |
|||
}; |
|||
|
|||
const copy = (element) => {}; |
|||
|
|||
const paste = (element) => {}; |
|||
|
|||
const cut = (element) => {}; |
|||
|
|||
const remove = (element) => { |
|||
if (targetElement) { |
|||
targetElement.outerHTML = '<mspace postion="left"></mspace>'; |
|||
} |
|||
}; |
|||
|
|||
defineExpose({ |
|||
show, |
|||
copy, |
|||
paste, |
|||
cut, |
|||
remove, |
|||
}); |
|||
</script> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<q-btn :title="$t('math.toolbar.actions.clean')" stretch flat no-caps icon="sym_o_cleaning_services" padding="4px 10px" @click="clean"></q-btn> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { useI18n } from 'vue-i18n'; |
|||
import { DialogManager } from '@/platform'; |
|||
|
|||
const props = defineProps({ |
|||
container: { type: Object, default: undefined }, |
|||
}); |
|||
|
|||
const { t } = useI18n(); |
|||
|
|||
const clean = () => { |
|||
DialogManager.confirm(t('math.toolbar.actions.clean.confirm'), () => { |
|||
props.container.getEditor().innerHTML = '<mspace postion="left"></mspace>'; |
|||
props.container.refresh(); |
|||
}); |
|||
}; |
|||
</script> |
@ -0,0 +1,31 @@ |
|||
<template> |
|||
<q-btn :title="$t('math.toolbar.base.addition')" stretch flat size="16px" padding="0px 6px" draggable="true" @dragstart="dragstart" @click="append"> |
|||
<math display="inline"> |
|||
<mrow> |
|||
<mo>+</mo> |
|||
</mrow> |
|||
</math> |
|||
</q-btn> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
container: { type: Object, default: undefined }, |
|||
}); |
|||
|
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>+</mo> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
|
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
|
|||
const append = () => { |
|||
const editor = props.container.getEditor(); |
|||
editor.innerHTML = editor.innerHTML + xmlData; |
|||
props.container.refresh(); |
|||
}; |
|||
</script> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<q-btn :title="$t('math.toolbar.base.and')" stretch flat padding="0px 2px" draggable="true" @dragstart="dragstart" @click="append"> |
|||
<math display="inline"> |
|||
<mo>&&</mo> |
|||
</math> |
|||
</q-btn> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
container: { type: Object, default: undefined }, |
|||
}); |
|||
|
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>&&</mo> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
|
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
|
|||
const append = () => { |
|||
const editor = props.container.getEditor(); |
|||
editor.innerHTML = editor.innerHTML + xmlData; |
|||
props.container.refresh(); |
|||
}; |
|||
</script> |
@ -0,0 +1,43 @@ |
|||
<template> |
|||
<q-btn :title="$t('math.toolbar.base.division')" stretch flat size="16px" padding="0px 10px" draggable="true" @dragstart="dragstart" @click="append"> |
|||
<math display="inline"> |
|||
<mfrac> |
|||
<mi>x</mi> |
|||
<mi>y</mi> |
|||
</mfrac> |
|||
</math> |
|||
</q-btn> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
container: { type: Object, default: undefined }, |
|||
}); |
|||
|
|||
const xmlData = ` |
|||
<mspace></mspace> |
|||
<mfrac> |
|||
<mrow> |
|||
<mspace position="left"></mspace> |
|||
<mi>x</mi> |
|||
<mspace position="right"></mspace> |
|||
</mrow> |
|||
<mrow> |
|||
<mspace position="left"></mspace> |
|||
<mi>y</mi> |
|||
<mspace position="right"></mspace> |
|||
</mrow> |
|||
</mfrac> |
|||
<mspace></mspace> |
|||
`; |
|||
|
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
|
|||
const append = () => { |
|||
const editor = props.container.getEditor(); |
|||
editor.innerHTML = editor.innerHTML + xmlData; |
|||
props.container.refresh(); |
|||
}; |
|||
</script> |
@ -0,0 +1,32 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.formater.comma')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>comma</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>,</mi> |
|||
<mi>y</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>comma</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>,</mi> |
|||
<mi>y</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,22 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.number.abs')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mi>|</mi> |
|||
<mi>x</mi> |
|||
<mi>|</mi> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mi>|</mi> |
|||
<mi>x</mi> |
|||
<mi>|</mi> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.number.ceil')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>ceil</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>ceil</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.degrees')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>degrees</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>degrees</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.hyperbolic.cosh')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>cosh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>cosh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.hyperbolic.csch')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>csch</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>csch</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.arccosh')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arccosh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arccosh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseHyperbolic.arccoth')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arccoth</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arccoth</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseHyperbolic.arccsch')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arccsch</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arccsch</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseHyperbolic.arcsech')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arcsech</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arcsech</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseHyperbolic.arcsinh')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arcsinh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arcsinh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseHyperbolic.arctanh')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arctanh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arctanh</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseTrigonometric.arccos')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arccos</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arccos</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseTrigonometric.arccot')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arccot</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arccot</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseTrigonometric.arcsec')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arcsec</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arcsec</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.inverseTrigonometric.arctan')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>arctan</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>arctan</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('functions.trigonometric.trigonometric.cos')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>cos</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>cos</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.trigonometric.cot')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>cot</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>cot</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
@ -0,0 +1,28 @@ |
|||
<template> |
|||
<div :title="$t('math.toolbar.functions.trigonometric.trigonometric.csc')" draggable="true" @dragstart="dragstart"> |
|||
<math display="inline"> |
|||
<mo>csc</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
</math> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
const xmlData = ` |
|||
<mspace position="left"></mspace> |
|||
<mo>csc</mo> |
|||
<mrow> |
|||
<mi>(</mi> |
|||
<mi>x</mi> |
|||
<mi>)</mi> |
|||
</mrow> |
|||
<mspace position="right"></mspace> |
|||
`; |
|||
const dragstart = (event) => { |
|||
event.dataTransfer.setData('math', xmlData); |
|||
event.dataTransfer.setDragImage(event.srcElement, 0, 0); |
|||
}; |
|||
</script> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue