Skip to content

Commit 42ec6a0

Browse files
committed
clear stashed base url off Drawing module on replot
.. so that in the event where window.location changes on pages with a <base>, our clip path urls will be properly updated.
1 parent 5887104 commit 42ec6a0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/plot_api/plot_api.js

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ exports.plot = function(gd, data, layout, config) {
113113
// so we can share cached text across tabs
114114
Drawing.makeTester();
115115

116+
// clear stashed base url
117+
delete Drawing.baseUrl;
118+
116119
// collect promises for any async actions during plotting
117120
// any part of the plotting code can push to gd._promises, then
118121
// before we move to the next step, we check that they're all

test/jasmine/tests/plot_interact_test.js

-4
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,6 @@ describe('plot svg clip paths', function() {
562562
});
563563

564564
it('should set clip path url to ids appended to window url', function(done) {
565-
// unstash base url from Drawing module object
566-
delete Drawing.baseUrl;
567-
568565
// this case occurs in some past versions of AngularJS
569566
// https://github.com/angular/angular.js/issues/8934
570567

@@ -587,7 +584,6 @@ describe('plot svg clip paths', function() {
587584
});
588585

589586
base.remove();
590-
delete Drawing.baseUrl;
591587
})
592588
.catch(failTest)
593589
.then(done);

0 commit comments

Comments
 (0)