Skip to content
Permalink
Browse files

bugfix reset overlays position (#753)

  • Loading branch information
Manuel-777 committed Nov 23, 2019
1 parent d923030 commit 3ef2a0804011b2b2e87210c63d5e636fe70f112b
Showing with 17 additions and 7 deletions.
  1. +17 −7 src/shared/player-data.js
@@ -1,5 +1,4 @@
import electron from "electron";
const ipc = electron.ipcRenderer;
import { ipcRenderer as ipc, remote } from "electron";
import _ from "lodash";
import {
CARD_TILE_FLAT,
@@ -53,6 +52,8 @@ const overlayCfg = {
type_counts: false
};

const primaryBounds = remote.screen.getPrimaryDisplay().bounds;

const defaultCfg = {
windowBounds: { width: 800, height: 600, x: 0, y: 0 },
cards: { cards_time: 0, cards_before: {}, cards: {} },
@@ -90,33 +91,42 @@ const defaultCfg = {
overlays: [
{
...overlayCfg,
bounds: { width: 300, height: 600, x: 0, y: 0 },
bounds: {
...primaryBounds,
width: 300,
height: 600
},
mode: OVERLAY_LEFT,
clock: true
},
{
...overlayCfg,
bounds: { width: 300, height: 600, x: 310, y: 0 },
bounds: {
...primaryBounds,
width: 300,
height: 600,
x: primaryBounds.x + 310
},
mode: OVERLAY_SEEN,
clock: false
},
{
...overlayCfg,
bounds: { width: 300, height: 600, x: 0, y: 0 },
bounds: { ...primaryBounds, width: 300, height: 600 },
mode: OVERLAY_DRAFT,
clock: false,
show: false
},
{
...overlayCfg,
bounds: { width: 300, height: 600, x: 0, y: 0 },
bounds: { ...primaryBounds, width: 300, height: 600 },
mode: OVERLAY_LOG,
clock: false,
show: false
},
{
...overlayCfg,
bounds: { width: 300, height: 600, x: 0, y: 0 },
bounds: { ...primaryBounds, width: 300, height: 600 },
mode: OVERLAY_FULL,
show: false
}

0 comments on commit 3ef2a08

Please sign in to comment.
You can’t perform that action at this time.