         
         if let theView = trimView {
             var viewFrame = bounds
-            viewFrame.origin.x = CGRectGetMidX(bounds) - CGFloat(optimumWidth / 2)
-            viewFrame.size.width = CGFloat(optimumWidth)
+            viewFrame.origin.x = CGRectGetMidX(bounds) - CGFloat(canvasWidth / 2)
+            viewFrame.size.width = CGFloat(canvasWidth)
             theView.frame = viewFrame
         }
         

            ++startPointX
        }
    }
}

class EditorView: NSView {
    
    // MARK: Defined types
    
    enum DragState: Int {
        case Started
        case DraggingFromLeft, DraggingFromRight
        case Ended
    }
    
    struct LevelGroup {
        let levels: Float[]
        var average: Float {
