mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 00:59:54 +08:00
Added tooltips for config options.
This commit is contained in:
Generated
+13
@@ -9406,6 +9406,11 @@
|
||||
"ts-pnp": "^1.1.6"
|
||||
}
|
||||
},
|
||||
"popper.js": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.15.0.tgz",
|
||||
"integrity": "sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA=="
|
||||
},
|
||||
"portfinder": {
|
||||
"version": "1.0.26",
|
||||
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz",
|
||||
@@ -13141,6 +13146,14 @@
|
||||
"vue-clickaway": "^2.2.2"
|
||||
}
|
||||
},
|
||||
"vue-directive-tooltip": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/vue-directive-tooltip/-/vue-directive-tooltip-1.6.3.tgz",
|
||||
"integrity": "sha512-aSdlBIdibctL+Tw+2j+IVUtz/fOZPLMQz0xxSoIGOA223WsPahiybSykJHx6QxtPzWq2phE/OZaCTmvMOVPyeA==",
|
||||
"requires": {
|
||||
"popper.js": "1.15.0"
|
||||
}
|
||||
},
|
||||
"vue-eslint-parser": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.0.tgz",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"vue": "^2.6.11",
|
||||
"vue-chartjs": "^3.5.0",
|
||||
"vue-context": "^5.2.0",
|
||||
"vue-directive-tooltip": "^1.6.3",
|
||||
"vue-json-component": "^0.4.1",
|
||||
"vue-slider-component": "^3.2.2",
|
||||
"vue-socket.io": "^3.0.9",
|
||||
|
||||
@@ -191,7 +191,7 @@ export let pages = {
|
||||
data: {
|
||||
axis: "axis0",
|
||||
},
|
||||
tooltip: "Generic incremental encoder without index. Set cpr to 4 * PPR (pulses per revolution).",
|
||||
tooltip: "Generic incremental encoder with index. Set cpr to 4 * PPR (pulses per revolution).",
|
||||
},
|
||||
],
|
||||
pageComponents: [
|
||||
@@ -218,7 +218,7 @@ export let pages = {
|
||||
title: "Control mode for Axis 0",
|
||||
link: "Control Modes 0",
|
||||
component: "wizardPage",
|
||||
next: "Misc_0",
|
||||
next: "Input_0",
|
||||
back: "Encoder_0",
|
||||
requirements: [],
|
||||
choices: [
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<wizardChoice
|
||||
v-for="choice in choices"
|
||||
v-bind:class="{chosen: selectedChoice == choice.text, unchosen: selectedChoice != choice.text}"
|
||||
v-tooltip.top="{
|
||||
content: choice.tooltip,
|
||||
class: 'tooltip-custom tooltip-other-custom fade-in',
|
||||
delay: 0,
|
||||
visible: choice.tooltip!=null,
|
||||
}"
|
||||
:key="choice.id"
|
||||
:imageUrl="choice.imageURL"
|
||||
:text="choice.text"
|
||||
@@ -18,6 +24,12 @@
|
||||
v-bind:data="customComponent.data"
|
||||
v-bind:config="config"
|
||||
v-bind:axis="axis"
|
||||
v-tooltip.top="{
|
||||
content: customComponent.tooltip,
|
||||
class: 'tooltip-custom tooltip-other-custom fade-in',
|
||||
delay: 0,
|
||||
visible: choice.tooltip!=null,
|
||||
}"
|
||||
:key="customComponent.id"
|
||||
v-on:click.native="selectedChoice=customComponent.component"
|
||||
v-on:choice="handleCustomChoice"
|
||||
@@ -94,7 +106,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style>
|
||||
.wizard-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -124,4 +136,27 @@ export default {
|
||||
.wizard-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.vue-tooltip.tooltip-custom {
|
||||
background-color: lightyellow;/* var(--fg-color); */
|
||||
border-radius: 0px;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
|
||||
font-family: "Roboto", sans-serif;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.vue-tooltip.tooltip-custom .tooltip-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vue-tooltip.fade-in {
|
||||
opacity: 0;
|
||||
animation: fadeIn ease 0.25s;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {opacity: 0}
|
||||
to {opacity: 1}
|
||||
}
|
||||
</style>
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import store from './store'
|
||||
|
||||
import Tooltip from 'vue-directive-tooltip';
|
||||
import 'vue-directive-tooltip/dist/vueDirectiveTooltip.css';
|
||||
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(Tooltip);
|
||||
|
||||
new Vue({
|
||||
store,
|
||||
|
||||
Reference in New Issue
Block a user