 	private var panning:Bool = false {
 		didSet {
 			currentPanTranslation = CGPoint(x: bounds.width/2 - drawingSize.width/2, y: bounds.height/2 - drawingSize.height/2)
-			setNeedsLayout()
+			updateLayout()
 		}
 	}
 

	}

	private dynamic func onTogglePanning(tgr:UITapGestureRecognizer) {
		panning = !panning
	}
}


		}
	}

	private func updatePan() {
		if let drawingView = drawingView {
			let size = drawingView.controller!.viewport.size
