@@ -362,16 +362,15 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
362362 * @param {DOM element } gd: the graph div `sel` is part of
363363 * @param {string } patternID: a unique (within this plot) identifier
364364 * for this pattern, so that we don't create unnecessary definitions
365- * @param {string } bgcolor: background color for this pattern
366- * @param {string } fgcolor: foreground color for this pattern
367- * @param {number } fgopacity: foreground opacity for this pattern
368365 * @param {number } size: size of unit squares for repetition of this pattern
369366 * @param {number } solidity: how solid lines of this pattern are
370367 * @param {string } mcc: color when painted with colorscale
371368 * @param {string } fillmode: fillmode for this pattern
372- * @param {string } prop: the property to apply to, 'fill' or 'stroke'
369+ * @param {string } bgcolor: background color for this pattern
370+ * @param {string } fgcolor: foreground color for this pattern
371+ * @param {number } fgopacity: foreground opacity for this pattern
373372 */
374- drawing . pattern = function ( sel , gd , patternID , shape , bgcolor , fgcolor , fgopacity , size , solidity , mcc , fillmode , prop ) {
373+ drawing . pattern = function ( sel , gd , patternID , shape , size , solidity , mcc , fillmode , bgcolor , fgcolor , fgopacity ) {
375374 if ( mcc ) {
376375 if ( fillmode === 'overlay' ) {
377376 bgcolor = mcc ;
@@ -550,8 +549,8 @@ drawing.pattern = function(sel, gd, patternID, shape, bgcolor, fgcolor, fgopacit
550549 . attr ( patternAttrs ) ;
551550 } ) ;
552551
553- sel . style ( prop , getFullUrl ( fullID , gd ) )
554- . style ( prop + ' -opacity', null ) ;
552+ sel . style ( 'fill' , getFullUrl ( fullID , gd ) )
553+ . style ( 'fill -opacity', null ) ;
555554
556555 sel . classed ( 'pattern_filled' , true ) ;
557556 var className2query = function ( s ) {
@@ -734,8 +733,12 @@ drawing.singlePointStyle = function(d, sel, trace, fns, gd) {
734733 var patternID = trace . uid ;
735734 if ( perPointPattern ) patternID += '-' + d . i ;
736735
737- drawing . pattern ( sel , gd , patternID , patternShape , patternBGColor , patternFGColor , patternFGOpacity ,
738- patternSize , patternSolidity , d . mcc , markerPattern . fillmode , 'fill' ) ;
736+ drawing . pattern (
737+ sel , gd , patternID ,
738+ patternShape , patternSize , patternSolidity ,
739+ d . mcc , markerPattern . fillmode ,
740+ patternBGColor , patternFGColor , patternFGOpacity
741+ ) ;
739742 } else {
740743 Color . fill ( sel , fillColor ) ;
741744 }
0 commit comments