-
Notifications
You must be signed in to change notification settings - Fork 668
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
Vertical align and line break bug since update #79
Comments
Hi @gitbrent , why line 1503 and 1504 commented. |
@ZouhaierSebri do you mean this one? It makes the valign work again 👍 |
Hi @mirkoint , `textObj.options.bodyProp = ( textObj.options.bodyProp || {} ); textObj.options.bodyProp.anchor = ( textObj.options.valign || slideObj.options.valign );` |
But it only vixes the valign. I'm also trying to fix the margin. Any idea @ZouhaierSebri ? |
Hey @gitbrent, |
yes I'm signing in to this question too :) where it will be fixed ? Thanks |
Hi @mirkoint @ZouhaierSebri @Szymon-dziewonski , Initially, I was vexed by this as having more than 1 align tag in a paragraph was causing issues in PowerPoint 2007, so i was hesitant and didn't to trade one issue for another. After spending months on Charts, i'm glad you all reminded me to re-engage on this one. Turns out it was just a good old fashioned bug where i was placing a properties tag inside the wrong XML parent tag and it was getting tangled up. I've fixed in the current codebase - both Try it out now and let me know what you think. Example below. var pptx = new PptxGenJS();
var slide = pptx.addNewSlide();
slide.addText(
[
{ text:'Text from', options:{ bold:true, breakLine:true } },
{ text:'Issue #79' }
],
{ x:0, y:0, w:2, h:2, valign:'middle', margin:0, line:'0088CC', fill:'F1F1F1' }
);
pptx.save('PptxGenJS-Issue79'); |
Hello @gitbrent , Thank you for respond, by the way great job, is there any way to donate you few "bucks"? :) |
Awesome @gitbrent, thank you so much! |
@Szymon-dziewonski - thanks! If you want to support the project, put a link to the GitHub site on your social network. :-) |
Hey there,
since the last update options like valign, align and margin don't work anymore for a text element with multiple styles like here:
slide.addText( [ { text: 'Lorem', options: { bold: true, breakLine: true } }, { text: description } ], { x: 0, y: 0, w: 2, h: 2, valign: 'middle', margin: 0 } )
Valign, align and margin will be default this way.
The text was updated successfully, but these errors were encountered: