|
@@ -70,17 +70,11 @@
|
|
|
(re-frame/reg-event-fx
|
|
(re-frame/reg-event-fx
|
|
|
::press-shift-enter-in-cell
|
|
::press-shift-enter-in-cell
|
|
|
(fn [{:keys [db]} [_ c r]]
|
|
(fn [{:keys [db]} [_ c r]]
|
|
|
- (let [min-row? (= r 1)
|
|
|
|
|
- min-col? (= c "A")
|
|
|
|
|
- new-col (if min-row?
|
|
|
|
|
- (if min-col?
|
|
|
|
|
- (coords/highest-col db)
|
|
|
|
|
- (coords/prev-letter c))
|
|
|
|
|
- c)
|
|
|
|
|
- new-row (if min-row?
|
|
|
|
|
- (coords/highest-row db)
|
|
|
|
|
- (dec r))]
|
|
|
|
|
- {:focus-on-cell [new-col new-row]})))
|
|
|
|
|
|
|
+ (when-not (and (= r 1) (= c "A"))
|
|
|
|
|
+ (let [min-row? (= r 1)
|
|
|
|
|
+ new-col (if min-row? (coords/prev-letter c) c)
|
|
|
|
|
+ new-row (if min-row? (coords/highest-row db) (dec r))]
|
|
|
|
|
+ {:focus-on-cell [new-col new-row]}))))
|
|
|
|
|
|
|
|
(re-frame/reg-fx
|
|
(re-frame/reg-fx
|
|
|
:focus-on-cell
|
|
:focus-on-cell
|