8000 cleanup old polar framework from gd · plotly/plotly.js@cc5d6a3 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc5d6a3

Browse files
committed
cleanup old polar framework from gd
1 parent 997946b commit cc5d6a3

File tree

5 files changed

+0
-57
lines changed

5 files changed

+0
-57
lines changed

src/lib/queue.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ queue.stopSequence = function(gd) {
126126
queue.undo = function undo(gd) {
127127
var queueObj, i;
128128

129-
if(gd.framework && gd.framework.isPolar) {
130-
gd.framework.undo();
131-
return;
132-
}
133129
if(gd.undoQueue === undefined ||
134130
isNaN(gd.undoQueue.index) ||
135131
gd.undoQueue.index <= 0) {
@@ -159,10 +155,6 @@ queue.undo = function undo(gd) {
159155
queue.redo = function redo(gd) {
160156
var queueObj, i;
161157

162-
if(gd.framework && gd.framework.isPolar) {
163-
gd.framework.redo();
164-
return;
165-
}
166158
if(gd.undoQueue === undefined ||
167159
isNaN(gd.undoQueue.index) ||
168160
gd.undoQueue.index >= gd.undoQueue.queue.length) {

src/plot_api/plot_api.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ function plot(gd, data, layout, config) {
152152
}
153153
}
154154

155-
// polar need a different framework
156-
if(gd.framework !== makePlotFramework) {
157-
gd.framework = makePlotFramework;
158-
makePlotFramework(gd);
159-
}
160-
161155
// clear gradient defs on each .plot call, because we know we'll loop through all traces
162156
Drawing.initGradients(gd);
163157

@@ -1770,10 +1764,6 @@ function relayout(gd, astr, val) {
17701764
gd = Lib.getGraphDiv(gd);
17711765
helpers.clearPromiseQueue(gd);
17721766

1773-
if(gd.framework && gd.framework.isPolar) {
1774-
return Promise.resolve(gd);
1775-
}
1776-
17771767
var aobj = {};
17781768
if(typeof astr === 'string') {
17791769
aobj[astr] = val;
@@ -2283,10 +2273,6 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
22832273
gd = Lib.getGraphDiv(gd);
22842274
helpers.clearPromiseQueue(gd);
22852275

2286-
if(gd.framework && gd.framework.isPolar) {
2287-
return Promise.resolve(gd);
2288-
}
2289-
22902276
if(!Lib.isPlainObject(traceUpdate)) traceUpdate = {};
22912277
if(!Lib.isPlainObject(layoutUpdate)) layoutUpdate = {};
22922278

src/plots/plots.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,6 @@ plots.purge = function(gd) {
17401740
delete gd._fullData;
17411741
delete gd._fullLayout;
17421742
delete gd.calcdata;
1743-
delete gd.framework;
17441743
delete gd.empty;
17451744

17461745
delete gd.fid;
@@ -2235,8 +2234,6 @@ plots.graphJson = function(gd, dataonly, mode, output, useDefaults, includeConfi
22352234
}
22362235
}
22372236

2238-
if(gd.framework && gd.framework.isPolar) obj = gd.framework.getConfig();
2239-
22402237
if(frames) obj.frames = stripObj(frames);
22412238

22422239
if(includeConfig) obj.config = stripObj(gd._context, true);

src/snapshot/cloneplot.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ function keyIsAxis(keyName) {
5858

5959

6060
module.exports = function clonePlot(graphObj, options) {
61-
// Polar plot compatibility
62-
if(graphObj.framework && graphObj.framework.isPolar) {
63-
graphObj = graphObj.framework.getConfig();
64-
}
65-
6661
var i;
6762
var oldData = graphObj.data;
6863
var oldLayout = graphObj.layout;

test/jasmine/tests/plot_promise_test.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -373,33 +373,6 @@ describe('Plotly.___ methods', function() {
373373
});
374374
});
375375

376-
describe('Plotly.relayout promise', function() {
377-
var promise;
378-
var promiseGd;
379-
380-
beforeEach(function(done) {
381-
var data = [{ x: [1, 2, 3], y: [4, 5, 6] }];
382-
var layout = {hovermode: 'closest'};
383-
var initialDiv = createGraphDiv();
384-
385-
Plotly.newPlot(initialDiv, data, layout);
386-
387-
initialDiv.framework = { isPolar: true };
388-
promise = Plotly.relayout(initialDiv, 'hovermode', false);
389-
390-
promise.then(function(gd) {
391-
promiseGd = gd;
392-
done();
393-
});
394-
});
395-
396-
it('should be returned with the graph div unchanged when the framework is polar', function() {
397-
expect(promiseGd).toBeDefined();
398-
expect(typeof promiseGd).toBe('object');
399-
expect(promiseGd.changed).toBeFalsy();
400-
});
401-
});
402-
403376
describe('Plotly.relayout promise', function() {
404377
var promise;
405378
var promiseRejected = false;

0 commit comments

Comments
 (0)
0