Skip to content

Commit 9ee2f69

Browse files
committed
Change case of pagebreak option (no camel-case)
1 parent 7886ac6 commit 9ee2f69

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/plugin/pagebreaks.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var orig = {
88
toContainer: Worker.prototype.toContainer
99
};
1010

11-
// Add pageBreak default options to the Worker template.
12-
Worker.template.opt.pageBreak = {
11+
// Add pagebreak default options to the Worker template.
12+
Worker.template.opt.pagebreak = {
1313
mode: ['css', 'legacy'], // 'avoid-all', 'css', 'legacy'
1414
before: [],
1515
after: [],
@@ -23,7 +23,7 @@ Worker.prototype.toContainer = function toContainer() {
2323
var pxPageHeight = this.prop.pageSize.inner.px.height;
2424

2525
// Check all requested modes.
26-
var modeSrc = [].concat(this.opt.pageBreak.mode);
26+
var modeSrc = [].concat(this.opt.pagebreak.mode);
2727
var mode = {
2828
avoidAll: modeSrc.indexOf('avoid-all') !== -1,
2929
css: modeSrc.indexOf('css') !== -1,
@@ -35,7 +35,7 @@ Worker.prototype.toContainer = function toContainer() {
3535
var self = this;
3636
['before', 'after', 'avoid'].forEach(function(key) {
3737
var all = mode.avoidAll && key === 'avoid';
38-
select[key] = all ? [] : [].concat(self.opt.pageBreak[key] || []);
38+
select[key] = all ? [] : [].concat(self.opt.pagebreak[key] || []);
3939
if (select[key].length > 0) {
4040
select[key] = Array.prototype.slice.call(
4141
root.querySelectorAll(select[key].join(', ')));
@@ -48,7 +48,7 @@ Worker.prototype.toContainer = function toContainer() {
4848

4949
// Loop through all elements.
5050
var els = root.querySelectorAll('*');
51-
Array.prototype.forEach.call(els, function pageBreak_loop(el) {
51+
Array.prototype.forEach.call(els, function pagebreak_loop(el) {
5252
// Setup pagebreak rules based on legacy and avoidAll modes.
5353
var rules = {
5454
before: false,

0 commit comments

Comments
 (0)