merge upstream
This commit is contained in:
commit
d8908ef2d8
1065 changed files with 32953 additions and 20092 deletions
|
|
@ -33,8 +33,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, onMounted, onUnmounted, ref, shallowRef, watch } from 'vue';
|
||||
import { isTouchUsing } from '@/scripts/touch.js';
|
||||
import { computed, defineAsyncComponent, onMounted, onUnmounted, ref, useTemplateRef, watch } from 'vue';
|
||||
import { isTouchUsing } from '@/utility/touch.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
|
|
@ -58,8 +58,8 @@ const emit = defineEmits<{
|
|||
(ev: 'dragEnded', value: number): void;
|
||||
}>();
|
||||
|
||||
const containerEl = shallowRef<HTMLElement>();
|
||||
const thumbEl = shallowRef<HTMLElement>();
|
||||
const containerEl = useTemplateRef('containerEl');
|
||||
const thumbEl = useTemplateRef('thumbEl');
|
||||
|
||||
const rawValue = ref((props.modelValue - props.min) / (props.max - props.min));
|
||||
const steppedRawValue = computed(() => {
|
||||
|
|
@ -151,9 +151,9 @@ function onMousedown(ev: MouseEvent | TouchEvent) {
|
|||
closed: () => dispose(),
|
||||
});
|
||||
|
||||
const style = document.createElement('style');
|
||||
style.appendChild(document.createTextNode('* { cursor: grabbing !important; } body * { pointer-events: none !important; }'));
|
||||
document.head.appendChild(style);
|
||||
const style = window.document.createElement('style');
|
||||
style.appendChild(window.document.createTextNode('* { cursor: grabbing !important; } body * { pointer-events: none !important; }'));
|
||||
window.document.head.appendChild(style);
|
||||
|
||||
const thumbWidth = getThumbWidth();
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ function onMousedown(ev: MouseEvent | TouchEvent) {
|
|||
let beforeValue = finalValue.value;
|
||||
|
||||
const onMouseup = () => {
|
||||
document.head.removeChild(style);
|
||||
window.document.head.removeChild(style);
|
||||
tooltipForDragShowing.value = false;
|
||||
window.removeEventListener('mousemove', onDrag);
|
||||
window.removeEventListener('touchmove', onDrag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue