     }
     
     var manualScroll = false
-//    @discardableResult open func scrollRectToVisible(_ aRect: NSRect, animated: Bool) -> Bool {
-//        manualScroll = true
-//        self.shouldAnimateOriginChange = animated
-//        return super.scrollToVisible(aRect)
-//    }
-    
+
     @discardableResult open func scrollRectToVisible(_ rect: CGRect, animated: Bool, completion: AnimationCompletion? = nil) -> Bool {
         
-        manualScroll = true
+        manualScroll = false
         shouldAnimateOriginChange = animated
         if animated == false {
             

        }
    }
    
    lazy var displayLink : CVDisplayLink = {
        
        var linkCallback : CVDisplayLinkOutputCallback = {( displayLink, _, _, _, _, displayLinkContext) -> CVReturn in
            unsafeBitCast(displayLinkContext, to: ClipView.self).updateOrigin()
            return kCVReturnSuccess
        }
        
        var link : CVDisplayLink?
        CVDisplayLinkCreateWithActiveCGDisplays(&link)
        CVDisplayLinkSetOutputCallback(link!, linkCallback, UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque()))
        return link!
    }()
    
    

    
    func updateCVDisplay(_ note: Notification) {
        if let screen = self.window?.screen {
            let screenDictionary = screen.deviceDescription
            let screenID = screenDictionary["NSScreenNumber"] as! NSNumber

            // super's implementation handle a normal scroll.
            
            super.scroll(to: newOrigin)
            // Can't remember why this is here, it may be to cleanup if needed
            if !manualScroll {
                self.endScrolling()
            }
        }
    }
    
