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

Impl <xdr:twoCellAnchor editAs=oneCell> #407

Merged
merged 7 commits into from
Nov 20, 2017
Merged

Impl <xdr:twoCellAnchor editAs=oneCell> #407

merged 7 commits into from
Nov 20, 2017

Conversation

Ockejanssen
Copy link
Contributor

It is not possible at the moment to store a image with an offset to tl and br.

Copy link
Collaborator

@guyonroche guyonroche left a comment

Choose a reason for hiding this comment

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

Hi Ocke, big thanks for contributing.
There are a couple of questions/issues I would like you to take a look at.
Also, would it be possible to also add a small bit to the README.md documenting the new functionality.
Kind Regards,
Guyon

@@ -30,7 +30,7 @@ utils.inherits(CellPositionXform, BaseXform, {
this.map['xdr:col'].render(xmlStream, col);
this.map['xdr:colOff'].render(xmlStream, colOff);

var row = Math.floor(model.row);
var row = model.editAsOneCell ? 0 : Math.floor(model.row);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the same adjustment be done to col (above)?

Also - is there any adjustment required for the parse functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll take a look at the parse function. About the col I don't know, I just looked into what OOo writes and did the same ;-)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've finally had some time to look into this. From what I can see (based on how Excel behaves) the row adjustment is not necessary, so I've removed it.

@@ -49,7 +49,12 @@ utils.inherits(TwoCellAnchorXform, BaseXform, {
},

render: function(xmlStream, model) {
xmlStream.openNode(this.tag);
if(model.range.editAs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know it's pedantic but could you add braces to this if statement

@Ockejanssen
Copy link
Contributor Author

At the moment I have no additional time to look for the parsing. I'm sorry. May be later.

@guyonroche guyonroche merged commit 7b43c68 into exceljs:master Nov 20, 2017
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