Skip to content

Commit e53e6bc

Browse files
committed
Remove todos and unneeded Lib.constrain
1 parent 2af00de commit e53e6bc

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/components/legend/defaults.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) {
111111
var defaultX, defaultY, defaultYAnchor;
112112
var defaultXAnchor = 'left';
113113

114-
// TODO: Adjust default xanchor if needed for container ref?
115-
// TODO: Constrain x or y if container ref to be within 0-1
116114
if(isHorizontal) {
117115
defaultX = 0;
118116

src/components/legend/draw.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,12 @@ function drawOne(gd, opts) {
163163
if(isPaperX) {
164164
lx = gs.l + gs.w * legendObj.x - FROM_TL[getXanchor(legendObj)] * legendObj._width;
165165
} else {
166-
legendObj.x = Lib.constrain(legendObj.x, 0, 1); // TODO: Move this to defaults setting?
167166
lx = fullLayout.width * legendObj.x - FROM_TL[getXanchor(legendObj)] * legendObj._width;
168167
}
169168

170169
if(isPaperY) {
171170
ly = gs.t + gs.h * (1 - legendObj.y) - FROM_TL[getYanchor(legendObj)] * legendObj._effHeight;
172171
} else {
173-
legendObj.y = Lib.constrain(legendObj.y, 0, 1); // TODO: Move this to defaults setting?
174172
ly = fullLayout.height * (1 - legendObj.y) - FROM_TL[getYanchor(legendObj)] * legendObj._effHeight;
175173
}
176174

0 commit comments

Comments
 (0)