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

feat(module:resizable): add direction parameter in NzResizeEvent #7987

Conversation

yuhengzhouz
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #7986

What is the new behavior?

NzResizeEvent will now contains a direction parameter with type NzResizeDirection

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@yuhengzhouz yuhengzhouz requested a review from hsuanxyz as a code owner June 19, 2023 09:47
@zorro-bot
Copy link

zorro-bot bot commented Jun 19, 2023

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #7987 (105ec29) into master (198644a) will increase coverage by 91.82%.
The diff coverage is 75.00%.

❗ Current head 105ec29 differs from pull request most recent head ccc8ba2. Consider uploading reports for the commit ccc8ba2 to get more accurate results

@@             Coverage Diff             @@
##           master    #7987       +/-   ##
===========================================
+ Coverage        0   91.82%   +91.82%     
===========================================
  Files           0      509      +509     
  Lines           0    17454    +17454     
  Branches        0     2774     +2774     
===========================================
+ Hits            0    16027    +16027     
- Misses          0     1135     +1135     
- Partials        0      292      +292     
Impacted Files Coverage Δ
components/resizable/resizable.directive.ts 95.32% <0.00%> (ø)
components/resizable/demo/basic.ts 100.00% <100.00%> (ø)

... and 507 files with indirect coverage changes

Copy link
Member

@hsuanxyz hsuanxyz left a comment

Choose a reason for hiding this comment

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

LGTM

@bokire
Copy link

bokire commented Jun 21, 2023

是否要对预览的ghostElement进行适配,目前示例里面不管是拖动左边还是右边的,预览效果都是右边变化

previewResize({ width, height, direction }: NzResizeEvent): void {
    this.createGhostElement();
    this.renderer.setStyle(this.ghostElement, 'width', `${width}px`);
    this.renderer.setStyle(this.ghostElement, 'height', `${height}px`);
    //todo adapt to the direction
  }

@simplejason simplejason merged commit 4143473 into NG-ZORRO:master Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants