Parcourir la source

Patch overflow behaviour so that z-index is always higher by 1.

Paulo Reis il y a 9 ans
Parent
commit
1646496f19
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      services/web/public/coffee/ide/directives/layout.coffee

+ 8 - 1
services/web/public/coffee/ide/directives/layout.coffee

@@ -106,7 +106,14 @@ define [
 							, 0
 							, 0
 
 
 					if attrs.allowOverflowOn?
 					if attrs.allowOverflowOn?
-						element.layout().allowOverflow(scope.$eval(attrs.allowOverflowOn))
+						layoutObj = element.layout()
+						overflowPane = scope.$eval(attrs.allowOverflowOn)
+						overflowPaneEl = layoutObj.panes[overflowPane]
+						# Set the panel as overflowing (gives it higher z-index and sets overflow rules)
+						layoutObj.allowOverflow overflowPane
+						# Read the given z-index value and increment it, so that it's higher than synctex controls.
+						overflowPaneZVal = overflowPaneEl.css "z-index"
+						overflowPaneEl.css "z-index", overflowPaneZVal + 1
 
 
 					resetOpenStates()
 					resetOpenStates()
 					onInternalResize()
 					onInternalResize()