Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (let [this-num-of-slide? (fn [n] (= (:focus-slide db) (- (:slides-count db) n)))]
- (cond
- (this-num-of-slide? 2) (update db :focus-slide inc) ; если предпоследний слайд
- (this-num-of-slide? 1) db ; если последний слайд
- :else (-> (assoc db :current-slides (->> (nth (:current-slides db) 2)
- inc
- (conj (into [] (take-last 2 (:current-slides db)))))
- :right-next-slide false)
- (update :focus-slide inc))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement