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

(ngx-features-viewer) Project template for right label #1

Open
damiclem opened this issue Jun 13, 2024 · 0 comments
Open

(ngx-features-viewer) Project template for right label #1

damiclem opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@damiclem
Copy link
Collaborator

Allow users to define their custom template on the right side of the plot, the same way it can be done on the left side. Example:

<ngx-features-viewer>
    <!-- Define template for label on the left side -->
    <!-- NOTE by default falls back to left side -->
    <ng-template [ngx-features-viewer-label]="left"></ng-template>
    <ng-template [ngx-features-viewer-label]></ng-template>
    <!-- Define template for label on the right side -->
    <ng-template [ngx-features-viewer-label]="right"></ng-template>
</ngx-features-viewer>

This should change the label property in NgxFeaturesViewerLabelDirective from this:

    @ContentChild(NgxFeaturesViewerLabelDirective)
    public label?: NgxFeaturesViewerLabelDirective;

to this:

    @ContentChild('ngx-features-viewer-label, ngx-features-viewer-label[left]')
    public 'label.left'?: NgxFeaturesViewerLabelDirective;

    @ContentChild('ngx-features-viewer-label[right]')
    public 'label.right'?: NgxFeaturesViewerLabelDirective;

Therefore, it must be handled in the DrawService.draw$ and DrawService.drawn$ pipelines accordingly.

@damiclem damiclem added enhancement New feature or request help wanted Extra attention is needed labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants