enso/app/gui2/stories/NavigatorWrapper.vue
Ilya Bogdanov a3873b9565
Numeric input widget (#8837)
Closes #8751
Closes #8752

- The numeric widget allows the use of the input field after clicking with LMB
- Slider is only visible if the engine provides widget configuration with set limits (see below for testing)
- Setting value outside limits is possible
- For now, to distinguish drag from click, we compare relative mouse movement on the mouse up event. We might benefit from using a timer instead, but let’s see how good it is now.
- Changes after demo
- No more input validation. You can enter literally anything and it would be accepted.
- Updates debouncing – the code is updated on defocus or when slider dragging has finished.


https://github.com/enso-org/enso/assets/6566674/b3580083-c678-4734-881c-97f8ac56176b
2024-01-25 09:41:37 +00:00

16 lines
330 B
Vue

<script setup lang="ts">
import { ref } from 'vue'
import { useNavigator } from '@/composables/navigator'
const viewportNode = ref<HTMLElement>()
const navigator = useNavigator(viewportNode)
</script>
<template>
<div ref="viewportNode" class="NavigatorWrapper">
<slot :navigator="navigator"></slot>
</div>
</template>