     /// The height of the open position for the drawer
     private var heightOfOpenDrawer: CGFloat {
         
-        var safeAreaTopInset: CGFloat = 20.0
-        var safeAreaBottomInset: CGFloat = 0.0
-        
-        if #available(iOS 11.0, *)
-        {
-            safeAreaTopInset = view.safeAreaInsets.top
-            safeAreaBottomInset = view.safeAreaInsets.bottom
-        }
-        
+        var safeAreaTopInset = pulleySafeAreaInsets.top
+        var safeAreaBottomInset = pulleySafeAreaInsets.bottom
+
         var height = self.view.bounds.height - safeAreaTopInset
         
         if currentDisplayMode == .panel {

        
        if supportedPositions.contains(.open)
        {
            var safeAreaTopInset: CGFloat = 20.0
            
            if #available(iOS 11.0, *)
            {
                safeAreaTopInset = view.safeAreaInsets.top
            }
            
            drawerStops.append((self.view.bounds.size.height - drawerTopInset - safeAreaTopInset))
        }
        
        return drawerStops

            }
        }

        let safeAreaTopInset = pulleySafeAreaInsets.top
        let safeAreaBottomInset = pulleySafeAreaInsets.bottom
        let safeAreaLeftInset = pulleySafeAreaInsets.left
        let safeAreaRightInset = pulleySafeAreaInsets.right

        
        let displayModeForCurrentLayout: PulleyDisplayMode = displayMode != .automatic ? displayMode : ((self.view.bounds.width >= 600.0 || self.traitCollection.horizontalSizeClass == .regular) ? .panel : .drawer)
        
