Fix inconsistencies in alignment related flags.

Related to #79.
This commit is contained in:
Andrey Antukh 2017-03-21 21:15:43 +01:00
parent 6e7a20974d
commit d69ab9edd8
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
3 changed files with 15 additions and 17 deletions

View file

@ -104,7 +104,8 @@
(defn alignment-activated?
[state]
(let [{:keys [page flags]} (:workspace state)
metadata (merge c/page-metadata (get-in state [:pages page :metadata]))]
metadata (->> (get-in state [:pages page :metadata])
(merge c/page-metadata))]
(and (contains? flags :grid-indexed)
(contains? flags :grid)
(:grid-alignment metadata))))