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

fix: resizer and baseline conflict with chart panning #156

Merged
merged 5 commits into from
Mar 22, 2024

Conversation

Keelaro1
Copy link
Contributor

No description provided.

@@ -75,6 +76,7 @@ export abstract class ChartBaseElement implements ChartEntity {
this.deactivate();
this._state = 'disabled';
}
this.entities.forEach(comp => comp.disable());
Copy link
Contributor Author

@Keelaro1 Keelaro1 Mar 14, 2024

Choose a reason for hiding this comment

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

Couldn't understand why disable method calls this.deactivate, and this.deactivate calls deactivate function of all child entities

Because of that we basically never call 'disable' and 'enable' functions of child entities which leads to incorrect behavior

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice question, need some time to figure it out

Copy link
Contributor

Choose a reason for hiding this comment

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

I should say for me disabled state and disable <-> enable transitions are completely useless
They were added a loooong time ago and I think we can mark them as deprecated. Looks like activate and deactivate do exactly the same

Copy link
Contributor Author

@Keelaro1 Keelaro1 Mar 15, 2024

Choose a reason for hiding this comment

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

Turned out they are not the same, using deactivate to child entities didn't make YDragNDrop entities of chart area pan "disabled" (we still can move chart vertically), only disable makes it work as expected

src/chart/model/baseline.model.ts Outdated Show resolved Hide resolved
src/chart/components/pan/chart-pan.component.ts Outdated Show resolved Hide resolved
@@ -75,6 +76,7 @@ export abstract class ChartBaseElement implements ChartEntity {
this.deactivate();
this._state = 'disabled';
}
this.entities.forEach(comp => comp.disable());
Copy link
Contributor

Choose a reason for hiding this comment

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

I should say for me disabled state and disable <-> enable transitions are completely useless
They were added a loooong time ago and I think we can mark them as deprecated. Looks like activate and deactivate do exactly the same

@disyakidneyshot disyakidneyshot merged commit c88784b into master Mar 22, 2024
2 checks passed
@disyakidneyshot disyakidneyshot deleted the fix-resizer-vertical-behavior branch March 22, 2024 09:23
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.

None yet

2 participants