Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Text in slides does not override the bullet master #620

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/gen-objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,11 @@ export function addTextDefinition(target: ISlide, text: string | IText[], opts:
opt.color = opt.color || target.color || DEF_FONT_COLOR // Set color (options > inherit from Slide > default to black)
}

// A.2: Placeholder should inherit their bullets or override them, so don't default them
if (!opt.placeholder || isPlaceholder) {
opt.bullet = opt.bullet || false
}

// B
if (opt.shape && opt.shape.name === 'line') {
opt.line = opt.line || '333333'
Expand Down
6 changes: 4 additions & 2 deletions src/gen-xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,10 @@ function genXmlParagraphProperties(textObj: ISlideObject | IText, isDefault: boo
bulletLvl0Margin +
'"'
strXmlBullet = '<a:buSzPct val="100000"/><a:buChar char="' + BULLET_TYPES['DEFAULT'] + '"/>'
} else {
strXmlBullet = '<a:buNone/>'
} else if ( textObj.options.bullet === false ){
// We only add this when the user explicitely asks for no bullet.
// Otherwise it can override the master defaults
Comment on lines +914 to +916
Copy link
Contributor

Choose a reason for hiding this comment

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

The spaces in the if don't match the existing style (space before '(', space after ')', no space after '(', no space before ')'), and the comment is indented in an odd way.

strXmlBullet = '<a:buNone/>';
}

// B: Close Paragraph-Properties
Expand Down