Skip to content

Commit b97895f

Browse files
committed
remove unnecessary call at the end of makePlotFramework and call recalc from gl3d, parcats and sankey
1 parent fe5ee9b commit b97895f

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

src/plot_api/plot_api.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3867,8 +3867,6 @@ function makePlotFramework(gd) {
38673867
.style('top', '0px')
38683868
.style('right', '0px');
38693869

3870-
fullLayout._lastBBox = gd.getBoundingClientRect();
3871-
38723870
gd.emit('plotly_framework');
38733871
}
38743872

src/plots/gl3d/scene.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ proto.render = function() {
307307
// update size of svg container
308308
var svgContainer = scene.svgContainer;
309309
var clientRect = scene.container.getBoundingClientRect();
310+
311+
gd._fullLayout._calcInverseTransform(gd);
310312
var scaleX = gd._fullLayout._invScaleX;
311313
var scaleY = gd._fullLayout._invScaleY;
312314
var width = clientRect.width * scaleX;

src/plots/ternary/ternary.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,11 @@ proto.initInteractions = function() {
579579

580580
function zoomPrep(e, startX, startY) {
581581
var dragBBox = dragger.getBoundingClientRect();
582-
var inverse = gd._fullLayout._invTransform;
583582
x0 = startX - dragBBox.left;
584583
y0 = startY - dragBBox.top;
584+
585585
gd._fullLayout._calcInverseTransform(gd);
586+
var inverse = gd._fullLayout._invTransform;
586587
var transformedCoords = Lib.apply3DTransform(inverse)(x0, y0);
587588
x0 = transformedCoords[0];
588589
y0 = transformedCoords[1];

src/traces/parcats/parcats.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,7 @@ function emitPointsEventColorHovermode(bandElement, eventName, event) {
767767
*
768768
*/
769769
function createHoverLabelForCategoryHovermode(gd, rootBBox, bandElement) {
770+
gd._fullLayout._calcInverseTransform(gd);
770771
var scaleX = gd._fullLayout._invScaleX;
771772
var scaleY = gd._fullLayout._invScaleY;
772773

@@ -871,6 +872,7 @@ function createHoverLabelForDimensionHovermode(gd, rootBBox, bandElement) {
871872
*
872873
*/
873874
function createHoverLabelForColorHovermode(gd, rootBBox, bandElement) {
875+
gd._fullLayout._calcInverseTransform(gd);
874876
var scaleX = gd._fullLayout._invScaleX;
875877
var scaleY = gd._fullLayout._invScaleY;
876878

src/traces/sankey/plot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ module.exports = function plot(gd, calcData) {
292292
var hovertemplateLabels = {valueLabel: d3.format(d.valueFormat)(d.node.value) + d.valueSuffix};
293293
d.node.fullData = d.node.trace;
294294

295+
gd._fullLayout._calcInverseTransform(gd);
295296
var scaleX = gd._fullLayout._invScaleX;
296297
var scaleY = gd._fullLayout._invScaleY;
297298

0 commit comments

Comments
 (0)