Browse Source

fix: row height size.

Ievgen Naida 5 years ago
parent
commit
32b7734156

+ 0 - 2
index.html

@@ -62,8 +62,6 @@
         ]
       },
       {
-        //keyframesShape: "rect",
-        //height: 40,
         selected: false,
         hidden: false,
         keyframes: [

+ 1 - 1
lib/animation-timeline.js

@@ -2278,8 +2278,8 @@ var timeline_Timeline = /*#__PURE__*/function (_TimelineEventsEmitte) {
 
         var rowHeight = TimelineStyleUtils.getRowHeight(row, _this5._options);
         var marginBottom = TimelineStyleUtils.getRowMarginBottom(row, _this5._options);
-        rowAbsoluteHeight += rowHeight + marginBottom;
         var currentRowY = rowAbsoluteHeight - _this5._scrollContainer.scrollTop;
+        rowAbsoluteHeight += rowHeight + marginBottom;
 
         if (index == 0) {
           toReturn.area.y = currentRowY;

File diff suppressed because it is too large
+ 0 - 0
lib/animation-timeline.min.js


+ 1 - 2
src/timeline.ts

@@ -1102,9 +1102,8 @@ export class Timeline extends TimelineEventsEmitter {
         // draw with scroll virtualization:
         const rowHeight = TimelineStyleUtils.getRowHeight(row, this._options);
         const marginBottom = TimelineStyleUtils.getRowMarginBottom(row, this._options);
-
-        rowAbsoluteHeight += rowHeight + marginBottom;
         const currentRowY = rowAbsoluteHeight - this._scrollContainer.scrollTop;
+        rowAbsoluteHeight += rowHeight + marginBottom;
         if (index == 0) {
           toReturn.area.y = currentRowY;
         }

+ 1 - 1
tests/js/styleTests.js

@@ -101,7 +101,7 @@ describe('TimelineStyleUtils', function () {
             asserts_1.assert.equal(animation_timeline_1.TimelineStyleUtils.stripeDraggable(rowStyle, globalStyle), false);
         });
     });
-    describe('Height', function () {
+    describe('Row size', function () {
         it('Height is taken from row', function () {
             var globalStyle = {
                 rowsStyle: {

File diff suppressed because it is too large
+ 0 - 0
tests/js/styleTests.js.map


Some files were not shown because too many files changed in this diff