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

Revert regression introduced in ngeo displayWindow component #5447

Merged
merged 3 commits into from Jan 22, 2020

Conversation

adube
Copy link
Contributor

@adube adube commented Jan 21, 2020

This patch fixes an other regression introduced by the automatic changes in: 6d38eed

This time it's the ngeo displayWindowComponent.

Explanation

An angular component gets its its binding properties (i.e. those defined in the html) being set their values in the $onInit method. In the constructor, their values are not yet set but we do need to type them:

   /**
     * @type {boolean}
     */
    this.resizable;

The issue introduced by the auto-patch is that they got values assigned according to their type:

    /**
     * @type {boolean}
     */
    this.resizable = false;

This breaks the setting of the value by Angular in $onInit. Therefore, we should not do that. It's okay to leave the type as boolean, because the property itself in this will be set to a boolean in $onInit. The angular option (through the biding) is optional but that doesn't matter.

There may be more regressions like this.

@adube adube requested review from fredj and sbrunner January 21, 2020 15:27
Copy link
Member

@sbrunner sbrunner left a comment

Choose a reason for hiding this comment

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

Thanks :-)

@adube adube merged commit c245054 into master Jan 22, 2020
@adube adube deleted the gsgmf-1180-info-window-fix-resize branch January 22, 2020 13:30
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

3 participants