Fix center-screen when select a magpos

This commit is contained in:
Nicola Carminati
2018-05-31 07:58:24 +02:00
parent 0d8b897385
commit 4c549c6cdd
+4 -4
View File
@@ -136,9 +136,9 @@ export default class depot extends Vue {
this.currentPosition = index;
var c = (this.$refs.positionslist as any);
var move = index * this.BLOCKSIZE;
if (index < this.positions.length - 2)
move = move - 2 * this.BLOCKSIZE;
c.scrollLeft = move;
var move = (index * this.BLOCKSIZE) ;
c.scrollLeft = move - (c.clientWidth /2) + this.BLOCKSIZE/2;
}
}