Skip to content
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

Open
wants to merge 4 commits into
base: stage
Choose a base branch
from

Conversation

Denisfront
Copy link
Collaborator

No description provided.

@Denisfront Denisfront changed the title Feature/chart 5 Feature/chart 5 - creating custom tooltips Jan 13, 2022
@tany31 tany31 changed the base branch from stage to feature/chart-4 January 18, 2022 06:31
src/components/UI/SwapChart.vue Outdated Show resolved Hide resolved
src/components/UI/SwapChart.vue Show resolved Hide resolved
src/components/UI/SwapChart.vue Outdated Show resolved Hide resolved
src/components/UI/SwapChart.vue Outdated Show resolved Hide resolved
src/components/UI/SwapChart.vue Outdated Show resolved Hide resolved
@tany31 tany31 changed the base branch from feature/chart-4 to stage January 27, 2022 09:28
<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">
Copy link
Collaborator

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 })
Copy link
Collaborator

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')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

рендер тултипом можно было реализовать через vue, т.е. описать в template

останется только придумать как правильно обработчики добавлять для графика

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants