             lineLayer.strokeColor = self._lineColor(for: lineLayer)
             lineLayer.lineWidth = self.gridLineWidth
             lineLayer.lineDashPattern = self.gridDashPattern as [NSNumber]
+            lineLayer.length = self._length(for: lineLayer)
             
             self._lineLayers.append(lineLayer)
             self.addSublayer(lineLayer)

                )
            }
            self.__numOfRows = newNumOfRows
        }
    }
    

    // Private Helpers
    private func _updateLineLayers(_ block: ((LineLayer) -> Void)) {
        self._lineLayers.forEach(block)
    }
}


// MARK: Layout
private extension GridLayer {
    func _preferredFrameSize() -> CGSize {
        return CGSize(width: self._width(), height: self._height())
    }
    
    func _layoutSublayers() {
        self._lineLayers.forEach(self._updatePosition)
    }
    
    // Helpers
    func _sizeFrame() {
        let frameSize: CGSize = self.preferredFrameSize()
        self.frame.size = frameSize
        self._borderLayer?.frame.size = frameSize
    }
    
    func _width() -> CGFloat {
        return ((2 * self.gridInsetFactor) + self._zeroedNumOfColumns) * self.columnWidth
    }
    
    func _height() -> CGFloat {
        return ((2 * self.gridInsetFactor) + self._zeroedNumOfRows) * self.rowHeight
    }
}

