Adam Shaw 6 лет назад
Родитель
Сommit
339fcde3e0

+ 17 - 17
packages/core/src/scrollgrid/util.tsx

@@ -1,6 +1,6 @@
 import { VNode, h, Ref } from '../vdom'
 import { VNode, h, Ref } from '../vdom'
 import { findElements } from '../util/dom-manip'
 import { findElements } from '../util/dom-manip'
-import { computeInnerRect } from '../util/dom-geom'
+// import { computeInnerRect } from '../util/dom-geom'
 import ComponentContext from '../component/ComponentContext'
 import ComponentContext from '../component/ComponentContext'
 
 
 
 
@@ -72,22 +72,22 @@ export function doSizingHacks(rootEl: HTMLElement) { // TODO: needs to run on wi
   // from scss:
   // from scss:
   // width: 100%; /* hack to force re-sizing this inner element when scrollbars appear/disappear */
   // width: 100%; /* hack to force re-sizing this inner element when scrollbars appear/disappear */
 
 
-  // for Firefox for all cells
-  // for Safari(?) for cells with rowspans
-  let vGrowEls = findElements(rootEl, 'td > .vgrow')
-  for (let vGrowEl of vGrowEls) {
-    let cellEl = vGrowEl.parentNode as HTMLElement
-    let cellInnerRect = computeInnerRect(cellEl, true) // TODO: cache!
-    let cellInnerHeight = cellInnerRect.bottom - cellInnerRect.top
-    let vGrowHeight = vGrowEl.getBoundingClientRect().height
-    let lacking = cellInnerHeight - vGrowHeight
-
-    if (lacking > 0.5) {
-      let cellEl = vGrowEl.parentNode as HTMLElement
-      cellEl.style.position = 'relative'
-      vGrowEl.classList.add('vgrow--absolute')
-    }
-  }
+  // // for Firefox for all cells
+  // // for Safari(?) for cells with rowspans
+  // let vGrowEls = findElements(rootEl, 'td > .vgrow')
+  // for (let vGrowEl of vGrowEls) {
+  //   let cellEl = vGrowEl.parentNode as HTMLElement
+  //   let cellInnerRect = computeInnerRect(cellEl, true) // TODO: cache!
+  //   let cellInnerHeight = cellInnerRect.bottom - cellInnerRect.top
+  //   let vGrowHeight = vGrowEl.getBoundingClientRect().height
+  //   let lacking = cellInnerHeight - vGrowHeight
+
+  //   if (lacking > 0.5) {
+  //     let cellEl = vGrowEl.parentNode as HTMLElement
+  //     cellEl.style.position = 'relative'
+  //     vGrowEl.classList.add('vgrow--absolute')
+  //   }
+  // }
 }
 }
 
 
 
 

+ 9 - 5
packages/core/src/styles/_scrollgrid.scss

@@ -25,12 +25,16 @@
 .scrollgrid__section { // a <tr>
 .scrollgrid__section { // a <tr>
   height: 1px;
   height: 1px;
 
 
-  &.vgrow {
-    height: auto; // undo 1px height. will cancel height:100% also
+  > td {
+    height: 1px; // needs a height so vgrow's within grow
+  }
+}
 
 
-    > td {
-      height: 100%;
-    }
+.scrollgrid__section.vgrow {
+  height: auto; // undo 1px height. will cancel height:100% also
+
+  > td {
+    height: 100%;
   }
   }
 }
 }
 
 

+ 3 - 3
packages/core/src/styles/_utils.scss

@@ -44,9 +44,9 @@ td.fc-today {
   height: 100%;
   height: 100%;
 }
 }
 
 
-.vgrow--abs {
-  height: auto;
-  position: absolute;
+.vgrow--absolute {
+  height: auto !important;
+  position: absolute !important;
   top: 0;
   top: 0;
   left: 0;
   left: 0;
   right: 0;
   right: 0;