Skip to content

Commit

Permalink
デッキの一時カラムの位置を指定している場合に右左移動メニューが出てこないパターンがあるのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Dec 27, 2020
1 parent 527d8bf commit 19cf1a4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client/app/common/views/deck/deck.column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default Vue.extend({
}
},
// アイテムが1つなら区切り線は表示しない
(this.pos?.first && this.pos?.last && this.pos?.top && this.pos?.bottom) ? undefined : null,
this.pos?.alone ? undefined : null,
// 左に移動
this.pos?.first ? undefined : {
icon: 'arrow-left',
Expand Down
27 changes: 23 additions & 4 deletions src/client/app/common/views/deck/deck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,44 @@
<div v-if="ids.length > 1" class="folder">
<template v-for="(id, stackIndex) in ids">
<x-column-core :ref="id" :key="id" :column="columns.find(c => c.id == id)" :is-stacked="true" @parentFocus="moveFocus(id, $event)"
:pos="{ first: layoutIndex === 0, last: layoutIndex === layoutL.length - 1, top: stackIndex === 0, bottom: stackIndex === ids.length - 1 }"
:pos="{
first: layoutIndex === 0,
last: layoutIndex === layoutL.length - 1 && layoutR.length === 0,
top: stackIndex === 0,
bottom: stackIndex === ids.length - 1
}"
/>
</template>
</div>
<x-column-core v-else :ref="ids[0]" :key="ids[0]" :column="columns.find(c => c.id == ids[0])" @parentFocus="moveFocus(ids[0], $event)"
:pos="{ first: layoutIndex === 0, last: layoutIndex === layoutL.length - 1, top: true, bottom: true }"
:pos="{
alone: layout.length === 1,
first: layoutIndex === 0,
last: layoutIndex === layoutL.length - 1 && layoutR.length === 0,
top: true, bottom: true }"
/>
</template>
<router-view></router-view>
<template v-for="(ids, layoutIndex) in layoutR">
<div v-if="ids.length > 1" class="folder">
<template v-for="(id, stackIndex) in ids">
<x-column-core :ref="id" :key="id" :column="columns.find(c => c.id == id)" :is-stacked="true" @parentFocus="moveFocus(id, $event)"
:pos="{ x: layoutIndex, first: layoutIndex === 0, last: layoutIndex === layoutR.length - 1, top: stackIndex === 0, bottom: stackIndex === ids.length - 1 }"
:pos="{
first: layoutIndex === 0 && layoutL.length === 0,
last: layoutIndex === layoutR.length - 1,
top: stackIndex === 0,
bottom: stackIndex === ids.length - 1
}"
/>
</template>
</div>
<x-column-core v-else :ref="ids[0]" :key="ids[0]" :column="columns.find(c => c.id == ids[0])" @parentFocus="moveFocus(ids[0], $event)"
:pos="{ x: layoutIndex, first: layoutIndex === 0, last: layoutIndex === layoutR.length - 1, top: true, bottom: true }"
:pos="{
alone: layout.length === 1,
first: layoutIndex === 0 && layoutL.length === 0,
last: layoutIndex === layoutR.length - 1,
top: true,
bottom: true }"
/>
</template>
<button ref="add" @click="add" :title="$t('@deck.add-column')"><fa icon="plus"/></button>
Expand Down

0 comments on commit 19cf1a4

Please sign in to comment.