         narrow-min-y (min-y narrowest node-sep char-sep)
         narrow-max-y (max-y narrowest node-sep char-sep)
         y-map (->> class-graphs
-                   (map #(let [delta (if (:aligned-down (meta %))
+                   (map #(let [delta (if (= (:alignment (meta %)) :right)
                                        (- narrow-max-y (max-y % node-sep
                                                               char-sep))
                                        (- narrow-min-y (min-y % node-sep

                 [{} #{}]
                 start-blocks)))


(defn block-info->ClassGraph
  "For a particular blockification, compacts these blocks in to a ClassGraph,
  in either an :up or :down direction"
  [block-info compacted]
  (let [block-keys (if (= compacted :up)
                     [:blocks-up :simple-succs :sources]
                     [:blocks-down :simple-preds :sinks])
        [blocks classify-edges start-blocks] (map block-info block-keys)

                                     in-class-edges)
                    block-y (if (empty? neighbor-ys)
                              0
                              (if (= compaction :up)
                                (+ (apply max neighbor-ys) node-sep)
                                (- (apply min neighbor-ys) node-sep)))]
                (assoc ys block block-y)))
            {}
            class)))

(defn get-shift-ys
  "Calculates the relative y-positions of classes. If compacted upward, we walk
  the classes downward; for downward compaction, upward."
  [classes block-classes class-edges node-sep char-sep rel-ys compaction]
  (reduce (fn [ys class]
            (let [rel-op ({:up + :down -} compaction)
                  neighbor-ys (map #(rel-op (- (+ (get ys (get block-classes (:dest %)))
                                                  (get rel-ys (:dest %)))
                                               (get rel-ys (:src %)))
