@@ -362,16 +362,15 @@ drawing.gradient = function(sel, gd, gradientID, type, colorscale, prop) {
362
362
* @param {DOM element } gd: the graph div `sel` is part of
363
363
* @param {string } patternID: a unique (within this plot) identifier
364
364
* 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
368
365
* @param {number } size: size of unit squares for repetition of this pattern
369
366
* @param {number } solidity: how solid lines of this pattern are
370
367
* @param {string } mcc: color when painted with colorscale
371
368
* @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
373
372
*/
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 ) {
375
374
if ( mcc ) {
376
375
if ( fillmode === 'overlay' ) {
377
376
bgcolor = mcc ;
@@ -550,8 +549,8 @@ drawing.pattern = function(sel, gd, patternID, shape, bgcolor, fgcolor, fgopacit
550
549
. attr ( patternAttrs ) ;
551
550
} ) ;
552
551
553
- sel . style ( prop , getFullUrl ( fullID , gd ) )
554
- . style ( prop + ' -opacity', null ) ;
552
+ sel . style ( 'fill' , getFullUrl ( fullID , gd ) )
553
+ . style ( 'fill -opacity', null ) ;
555
554
556
555
sel . classed ( 'pattern_filled' , true ) ;
557
556
var className2query = function ( s ) {
@@ -734,8 +733,12 @@ drawing.singlePointStyle = function(d, sel, trace, fns, gd) {
734
733
var patternID = trace . uid ;
735
734
if ( perPointPattern ) patternID += '-' + d . i ;
736
735
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
+ ) ;
739
742
} else {
740
743
Color . fill ( sel , fillColor ) ;
741
744
}
0 commit comments