-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/chart 5 - creating custom tooltips #162
base: stage
Are you sure you want to change the base?
Conversation
<div class="wallet-info__optional-buttons"> | ||
<div class="wallet-info__chart-switcher-wrapper"> | ||
<swap-switch v-model="isChartView" label="Price chart"></swap-switch> | ||
<match-media v-slot="{ phone }" tag="div"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно было использовать inject
, чтобы не вносить много изменений
const tooltipNode = document.createElement('div') | ||
tooltipNode.className = `swap-chart__tooltip swap-chart__tooltip--${tooltipConf.name}` | ||
this.$refs.swapChart.appendChild(tooltipNode) | ||
this.bindedMoveTooltip = this.movementOfTooltip.bind(this, { tooltipNode, tooltipConf }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
когда несколько конфигов (а их сейчас несколько), то перетирается метод bindedMoveTooltip
по итогу, в destroyed - очищается обработчик для последнего метода только
}, | ||
methods: { | ||
createTooltips() { | ||
tooltipsConfiguration.forEach(tooltipConf => { | ||
const tooltipNode = document.createElement('div') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
рендер тултипом можно было реализовать через vue, т.е. описать в template
останется только придумать как правильно обработчики добавлять для графика
No description provided.