File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ export default {
4343 fetching () {
4444 return this .$store .state .loading .bookmarks
4545 },
46+ sidebar () {
47+ return this .$store .state .sidebar
48+ },
4649 },
4750 watch: {
4851 newBookmark () {
@@ -60,6 +63,11 @@ export default {
6063 itemWidth () {
6164 this .recalculateVisibleItems ()
6265 },
66+ sidebar () {
67+ this .$nextTick (() => {
68+ this .onScroll ()
69+ })
70+ },
6371 },
6472 mounted () {
6573 this .$nextTick (() => {
@@ -73,6 +81,8 @@ export default {
7381 },
7482 methods: {
7583 onViewModeChange () {
84+ this .viewport .width = this .$el .clientWidth
85+ this .viewport .height = this .$el .clientHeight
7686 if (this .viewMode === ' grid' ) {
7787 this .itemHeight = GRID_ITEM_HEIGHT
7888 this .itemWidth = GRID_ITEM_WIDTH
@@ -158,7 +168,7 @@ export default {
158168 style: {
159169 position: ' absolute' ,
160170 top: ` ${ x * this .itemHeight } px` ,
161- left: ` ${ y * this .itemWidth + 10 } px` ,
171+ left: ` ${ y * this .itemWidth + (itemsPerRow === 1 ? 0 : 10 ) } px` ,
162172 height: ` ${ this .itemHeight } px` ,
163173 width: ` ${ this .itemWidth } px` ,
164174 },
You can’t perform that action at this time.
0 commit comments