Procházet zdrojové kódy

fix legend offset bug

tripeur před 4 roky
rodič
revize
501d84f26b
3 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 1 0
      lib/Timeline.js
  2. 0 0
      lib/Timeline.js.map
  3. 2 1
      src/Timeline.ts

+ 1 - 0
lib/Timeline.js

@@ -352,6 +352,7 @@ let Timeline = class Timeline extends lit_element_1.LitElement {
                     currentDate.add(1, legendUnit).diff(currentDate, "m") >= legendMinUnitSpan);
             if (isLegendPossible) {
                 let currentHeader = currentDate.format(format);
+                nextColumn = currentDate;
                 const row = [];
                 let i = 0;
                 for (let j = 0; j < nCol; j++) {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
lib/Timeline.js.map


+ 2 - 1
src/Timeline.ts

@@ -420,7 +420,7 @@ class Timeline extends LitElement {
       const currentDate = dayjs(this._start);
       const format = this.legendUnitFormat[legendUnit];
       let nextColumn = currentDate.add(legendMinUnitSpan, "m");
-      // Check is the starting and end date can accomodate fews cell of the given unit for this unit of time
+      // Check if the starting and end date can accomodate fews cell of the given unit for this unit of time
       const isLegendPossible =
         // Enough time to fit 1 cell AND
         this._end.diff(this._start, legendUnit) > 0 &&
@@ -431,6 +431,7 @@ class Timeline extends LitElement {
 
       if (isLegendPossible) {
         let currentHeader = currentDate.format(format);
+        nextColumn = currentDate;
         const row: Array<legendItem> = [];
         let i = 0;
         for (let j = 0; j < nCol; j++) {

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů