Skip to content

Commit c5948d4

Browse files
committed
fix timenav height computation to avoid labels clipping.
1 parent f9f3c90 commit c5948d4

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
3.9.6 (2025-01-10)
2+
-------------------------
3+
* Change initial computation of component heights to address axis labels overflowing
4+
5+
16
3.9.5 (2024-12-13)
27
-------------------------
38
* Recognize x.com in URL to trigger tweet embeds

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@knight-lab/timelinejs",
3-
"version": "3.9.5",
3+
"version": "3.9.6",
44
"license": "MPL-2.0",
55
"description": "TimelineJS v3: A Storytelling Timeline built in JavaScript, made by Northwestern University Knight Lab.",
66
"dependencies": {

src/js/timeline/Timeline.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ class Timeline {
458458

459459

460460
// Update Display
461-
this._updateDisplay(this._timenav.options.height, true, 2000);
461+
// don't pass the height, since it gets computed
462+
// and passing it leads to accidental duplicate adjustments
463+
this._updateDisplay() // this._timenav.options.height, true, 2000);
462464

463465
}
464466

@@ -695,7 +697,9 @@ class Timeline {
695697

696698
var height = 0;
697699

698-
if (timenav_height) {
700+
if (false) {
701+
// was if (timenav_height) but that led to repetitive application
702+
// of the padding adjustment at the en
699703
height = timenav_height;
700704
} else {
701705
if (this.options.timenav_height_percentage || timenav_height_percentage) {

0 commit comments

Comments
 (0)