fix old timeline legend width calculation (#5594)

The calculation of an element's width was assigned to the wrong variable in #e04cc7e5794273103306a19ebbece0feb9cc192d

[ci skip]
pull/5592/merge
ulferts 8 years ago committed by Oliver Günther
parent c08d672c73
commit 96b20eae2a
  1. 6
      frontend/app/timelines/models/mixins/ui.js

@ -477,7 +477,7 @@ module.exports = function($timeout) {
// *** beginning decorations ***
var lastDivider, caption, captionElement, bbox, dividerPath;
var lastDivider, caption, captionElement, bbox, dividerPath, captionWidth;
var padding = 2;
lastDivider = 0;
@ -524,8 +524,8 @@ module.exports = function($timeout) {
'font-size': 10
});
lastDivider = jQuery(captionElement.node).width() || 0;
x = (lastDivider + (left - lastDivider) / 2) - (lastDivider / 16);
captionWidth = jQuery(captionElement.node).width() || 0;
x = (lastDivider + (left - lastDivider) / 2) - (captionWidth / 16);
y = (deco - padding);
captionElement

Loading…
Cancel
Save