@@ -8,8 +8,8 @@ var orig = {
8
8
toContainer : Worker . prototype . toContainer
9
9
} ;
10
10
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 = {
13
13
mode : [ 'css' , 'legacy' ] , // 'avoid-all', 'css', 'legacy'
14
14
before : [ ] ,
15
15
after : [ ] ,
@@ -23,7 +23,7 @@ Worker.prototype.toContainer = function toContainer() {
23
23
var pxPageHeight = this . prop . pageSize . inner . px . height ;
24
24
25
25
// Check all requested modes.
26
- var modeSrc = [ ] . concat ( this . opt . pageBreak . mode ) ;
26
+ var modeSrc = [ ] . concat ( this . opt . pagebreak . mode ) ;
27
27
var mode = {
28
28
avoidAll : modeSrc . indexOf ( 'avoid-all' ) !== - 1 ,
29
29
css : modeSrc . indexOf ( 'css' ) !== - 1 ,
@@ -35,7 +35,7 @@ Worker.prototype.toContainer = function toContainer() {
35
35
var self = this ;
36
36
[ 'before' , 'after' , 'avoid' ] . forEach ( function ( key ) {
37
37
var all = mode . avoidAll && key === 'avoid' ;
38
- select [ key ] = all ? [ ] : [ ] . concat ( self . opt . pageBreak [ key ] || [ ] ) ;
38
+ select [ key ] = all ? [ ] : [ ] . concat ( self . opt . pagebreak [ key ] || [ ] ) ;
39
39
if ( select [ key ] . length > 0 ) {
40
40
select [ key ] = Array . prototype . slice . call (
41
41
root . querySelectorAll ( select [ key ] . join ( ', ' ) ) ) ;
@@ -48,7 +48,7 @@ Worker.prototype.toContainer = function toContainer() {
48
48
49
49
// Loop through all elements.
50
50
var els = root . querySelectorAll ( '*' ) ;
51
- Array . prototype . forEach . call ( els , function pageBreak_loop ( el ) {
51
+ Array . prototype . forEach . call ( els , function pagebreak_loop ( el ) {
52
52
// Setup pagebreak rules based on legacy and avoidAll modes.
53
53
var rules = {
54
54
before : false ,
0 commit comments