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

Ability to set start number "startAt" for a bullet list of type numbered #554

Closed
bj-mitchell opened this issue Jun 7, 2019 · 4 comments
Closed
Assignees
Milestone

Comments

@bj-mitchell
Copy link

I have a numbered bullet list that continues over multiple slides and it would be nice to be able to set the starting number for a bullet of type number. I apologize if this already exist, but I could not find it in the documentation.

@bj-mitchell
Copy link
Author

After looking thru some past issues, I saw one opened by @mayvazyan regarding numbered list. Looking at that code pointed to what looks like the right area to address this.

Around line 4209, I changed

strXmlBullet = '<a:buSzPct val="100000"/><a:buFont typeface="+mj-lt"/><a:buAutoNum type="arabicPeriod"/>';

to

var startAt = textObj.options.bullet.startAt ? textObj.options.bullet.startAt : '1';
strXmlBullet = '<a:buSzPct val="100000"/><a:buFont typeface="+mj-lt"/><a:buAutoNum type="arabicPeriod" startAt="' + startAt + '"/>';

and it gives the current desired result.

Example:
bullet: { type: 'number', startAt: '4' }

@bj-mitchell
Copy link
Author

bj-mitchell commented Jun 12, 2019

I merged in changes from gitgrent#452 as they were directly related:

var startAt = textObj.options.bullet.startAt || '1';
var style = textObj.options.bullet.style || 'arabicPeriod';
strXmlBullet = '<a:buSzPct val="100000"/><a:buFont typeface="+mj-lt"/><a:buAutoNum type="' + style + '" startAt="' + startAt + '"/>';

@josenriq
Copy link

+1
Would be great to have this feature.

@gitbrent gitbrent self-assigned this Jul 25, 2019
@gitbrent gitbrent added this to the 3.1.0 milestone Jul 25, 2019
@gitbrent gitbrent modified the milestones: 3.1.0, 3.0.0 Sep 3, 2019
@gitbrent
Copy link
Owner

gitbrent commented Sep 3, 2019

Hi @bj-mitchell

Thanks for the request and the pull code.

This feature has been added to the upcoming 3.0 release.

@gitbrent gitbrent closed this as completed Sep 3, 2019
gitbrent added a commit that referenced this issue Sep 3, 2019
ericrockey pushed a commit to WeTransfer/PptxGenJS that referenced this issue Mar 24, 2020
ericrockey pushed a commit to WeTransfer/PptxGenJS that referenced this issue Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants