Active heave compensation of a floating crane using electric drive