Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add type definition for WorksheetModel.merges#2281

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Siemienik merged 2 commits intoexceljs:masterfromytjmt:issue-1341
Sep 21, 2023

Conversation

ytjmt
Copy link
Contributor

Summary

Closes#1341

Test plan

I confirmed the type isRange['range'][]:

  • // Merges
    model.merges=[];
    _.each(this._merges,merge=>{
    model.merges.push(merge.range);
    });
  • _mergeCellsInternal(dimensions,ignoreStyle){
    // check cells aren't already merged
    _.each(this._merges,merge=>{
    if(merge.intersects(dimensions)){
    thrownewError('Cannot merge already merged cells');
    }
    });
    // apply merge
    constmaster=this.getCell(dimensions.top,dimensions.left);
    for(leti=dimensions.top;i<=dimensions.bottom;i++){
    for(letj=dimensions.left;j<=dimensions.right;j++){
    // merge all but the master cell
    if(i>dimensions.top||j>dimensions.left){
    this.getCell(i,j).merge(master,ignoreStyle);
    }
    }
    }
    // index merge
    this._merges[master.address]=dimensions;
  • constdimensions=newRange(cells);
    this._mergeCellsInternal(dimensions,true);

Copy link
Member

@SiemienikSiemienik left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

ytjmt reacted with thumbs up emojiytjmt reacted with hooray emojiytjmt reacted with rocket emoji
@SiemienikSiemienik merged commit4abccf5 intoexceljs:masterSep 21, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@SiemienikSiemienikSiemienik approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[BUG] Typescript types not support worksheet.model.merges
2 participants
@ytjmt@Siemienik

[8]ページ先頭

©2009-2025 Movatter.jp