@@ -1302,10 +1302,10 @@ axes.findSubplotsWithAxis = function(subplots, ax) {
1302
1302
1303
1303
// makeClipPaths: prepare clipPaths for all single axes and all possible xy pairings
1304
1304
axes . makeClipPaths = function ( gd ) {
1305
- var layout = gd . _fullLayout ,
1306
- defs = layout . _defs ,
1307
- fullWidth = { _offset : 0 , _length : layout . width , _id : '' } ,
1308
- fullHeight = { _offset : 0 , _length : layout . height , _id : '' } ,
1305
+ var fullLayout = gd . _fullLayout ,
1306
+ defs = fullLayout . _defs ,
1307
+ fullWidth = { _offset : 0 , _length : fullLayout . width , _id : '' } ,
1308
+ fullHeight = { _offset : 0 , _length : fullLayout . height , _id : '' } ,
1309
1309
xaList = axes . list ( gd , 'x' , true ) ,
1310
1310
yaList = axes . list ( gd , 'y' , true ) ,
1311
1311
clipList = [ ] ,
@@ -1322,6 +1322,7 @@ axes.makeClipPaths = function(gd) {
1322
1322
1323
1323
var defGroup = defs . selectAll ( 'g.clips' )
1324
1324
. data ( [ 0 ] ) ;
1325
+
1325
1326
defGroup . enter ( ) . append ( 'g' )
1326
1327
. classed ( 'clips' , true ) ;
1327
1328
@@ -1330,11 +1331,14 @@ axes.makeClipPaths = function(gd) {
1330
1331
// https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I
1331
1332
var axClips = defGroup . selectAll ( '.axesclip' )
1332
1333
. data ( clipList , function ( d ) { return d . x . _id + d . y . _id ; } ) ;
1334
+
1333
1335
axClips . enter ( ) . append ( 'clipPath' )
1334
1336
. classed ( 'axesclip' , true )
1335
- . attr ( 'id' , function ( d ) { return 'clip' + layout . _uid + d . x . _id + d . y . _id ; } )
1337
+ . attr ( 'id' , function ( d ) { return 'clip' + fullLayout . _uid + d . x . _id + d . y . _id ; } )
1336
1338
. append ( 'rect' ) ;
1339
+
1337
1340
axClips . exit ( ) . remove ( ) ;
1341
+
1338
1342
axClips . each ( function ( d ) {
1339
1343
d3 . select ( this ) . select ( 'rect' ) . attr ( {
1340
1344
x : d . x . _offset || 0 ,
0 commit comments